Commit a26c676a authored by 黄奎's avatar 黄奎

1111

parent 784e77c2
......@@ -7,7 +7,7 @@
<div class="content">
<div style="margin-bottom:20px">
<span>分类</span>
<el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.StoreId"
<el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.CategoryId"
size="small" placeholder="请选择">
<el-option label="不限" :value="0"></el-option>
<el-option v-for="item in StoreList" :key="item.Id" :label="item.Name" :value="item.Id">
......@@ -58,7 +58,7 @@
msg: {
pageIndex: 1,
pageSize: 15,
StoreId: 0, //门店Id
CategoryId: 0, //门店Id
WorkDate: '', //开始日期
EndWorkDate: '' //结束日期
},
......
......@@ -8,7 +8,7 @@
<div class="content">
<div style="margin-bottom:20px">
<span>分类名称</span>
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="postMsg.Name">
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="msg.Name">
</el-input>
<el-button @click="msg.pageIndex=1,getList()" size="small" type="primary">
查询
......@@ -20,13 +20,21 @@
<el-table-column prop="Name" label="名称"></el-table-column>
<el-table-column label="Logo" width="300px">
<template slot-scope="scope">
<img :src="scope.row.ServiceLogo" style="width:35px;height:35px;" alt="" />
<img :src="scope.row.Image" style="width:35px;height:35px;" alt="" />
</template>
</el-table-column>
<el-table-column prop="OrderNum" label="排序">
<el-table-column label="启用状态" width="300px">
<template slot-scope="scope">
{{scope.row.Enable==1?"启用":"禁用"}}
</template>
</el-table-column>
<el-table-column prop="Final_Price" label="操作" width="250px">
<el-table-column prop="Sort" label="排序">
</el-table-column>
<el-table-column label="操作" width="250px">
<template slot-scope="scope">
<el-button size="mini" type="info" plain @click="showCategoryForm(scope.row)">编辑 </el-button>
<el-button size="mini" type="info" plain @click="RemmoveMall(scope.row)">禁用</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
......@@ -48,6 +56,10 @@
<img v-if="postMsg.Image" :src="postMsg.Image" alt="" style="width:100px;height:100px;" />
</div>
</el-form-item>
<el-form-item label="启用状态" prop="name">
<el-radio v-model="postMsg.Enable" :label="1">启用</el-radio>
<el-radio v-model="postMsg.Enable" :label="2">禁用</el-radio>
</el-form-item>
<el-form-item label="排序">
<el-input style="width:250px" size="small" maxlength="200" v-model="postMsg.Sort">
</el-input>
......@@ -79,11 +91,8 @@
msg: {
pageIndex: 1,
pageSize: 15,
StoreId: 0, //门店Id
WorkDate: '', //开始日期
EndWorkDate: '' //结束日期
Name: "",
},
StoreList: [], //门店数据
dateList: [], //日期
editTitle: "新增分类分类",
postMsg: {
......@@ -100,7 +109,7 @@
created() {},
mounted() {
this.getList();
this.getStoreList()
},
methods: {
openChangeDig() {
......@@ -111,28 +120,11 @@
this.postMsg.Image = url
this.isShowChooseImage = false;
},
//获取门店下拉
getStoreList() {
this.apipost("/api/MContent/GetStoresList", {}, res => {
if (res.data.resultCode == 1) {
this.StoreList = res.data.data;
} else {
this.Error(res.data.message);
}
})
},
//获取数据
getList() {
this.isShowCategoryForm = false;
if (this.dateList && this.dateList.length > 0) {
this.msg.WorkDate = this.dateList[0];
this.msg.EndWorkDate = this.dateList[1];
} else {
this.msg.WorkDate = '';
this.msg.EndWorkDate = '';
}
this.loading = true;
this.assetsApipost("/api/Reserve/GetAchievementsList", this.msg, res => {
this.assetsApipost("/api/Assess/GetCategoryPageList", this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
......@@ -148,12 +140,32 @@
},
//显示表单
showCategoryForm(item) {
if (item) {
this.editTitle = "修改分类";
this.postMsg.Id = item.Id;
this.postMsg.Name = item.Name;
this.postMsg.Image = item.Image;
this.postMsg.Enable = item.Enable;
this.postMsg.Sort = item.Sort;
} else {
this.editTitle = "新增分类";
this.postMsg.Id = 0;
this.postMsg.Name = "";
this.postMsg.Image = "";
this.postMsg.Enable = 1;
this.postMsg.Sort = 0;
}
this.isShowCategoryForm = true;
},
//新增修改分类
saveData() {
this.assetsApipost("/api/Assess/SetCategoryInfo", this.postMsg, res => {
if (res.data.resultCode == 1) {
this.getList();
} else {
this.Error(res.data.message);
}
})
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment