Commit eb5972e4 authored by 黄奎's avatar 黄奎

页面修改

parent 3428de45
...@@ -2,13 +2,27 @@ ...@@ -2,13 +2,27 @@
<div class="performanceStatics"> <div class="performanceStatics">
<div class="head-title"> <div class="head-title">
估价列表 估价列表
</div> </div>
<div class="content"> <div class="content">
<div style="margin-bottom:20px"> <div style="margin-bottom:20px">
<span>分类</span>
<el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.CategoryId"
size="small" placeholder="请选择" clearable>
<el-option label="不限" :value="0"></el-option>
<el-option v-for="item in CategoryList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
<span>分类名称</span> <span>分类名称</span>
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="msg.Name"> <el-input type="text" style="width:250px" size="small" maxlength="100" v-model="msg.Name">
</el-input> </el-input>
<span>是否回复</span>
<el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.IsReply"
size="small" placeholder="请选择" clearable>
<el-option label="不限" :value="0"></el-option>
<el-option v-for="item in ReplyList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
<el-button @click="msg.pageIndex=1,getList()" size="small" type="primary"> <el-button @click="msg.pageIndex=1,getList()" size="small" type="primary">
查询 查询
</el-button> </el-button>
...@@ -16,23 +30,32 @@ ...@@ -16,23 +30,32 @@
<el-table :data="tableData" v-loading="loading" border style="width: 100%"> <el-table :data="tableData" v-loading="loading" border style="width: 100%">
<el-table-column prop="Id" label="编号" width="150"> <el-table-column prop="Id" label="编号" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="Name" label="名称"></el-table-column> <el-table-column prop="UserName" label="用户昵称"></el-table-column>
<el-table-column label="Logo" width="300px"> <el-table-column prop="CategoryName" label="分类"></el-table-column>
<el-table-column prop="BrandName" label="品牌名称"></el-table-column>
<el-table-column prop="CreateDate" label="创建时间"></el-table-column>
<el-table-column label="是否回复">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.Image" style="width:35px;height:35px;" alt="" /> <el-tag v-if="scope.row.ReplyDate==''" effect="dark">
未回复
</el-tag>
<el-tag v-else effect="dark">
已回复
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="启用状态" width="300px"> <el-table-column label="回复内容">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.Enable==1?"启用":"禁用"}} {{scope.row.ReplyContent}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="Sort" label="排序"> <el-table-column prop="ReplyDate" label="回复时间">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="250px"> <el-table-column label="操作" width="250px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="info" plain @click="showCategoryForm(scope.row)">编辑 </el-button> <el-button v-if="scope.row.ReplyDate==''" size="mini" type="info" plain
<el-button size="mini" type="info" plain @click="RemmoveCategory(scope.row)">删除</el-button> @click="showReplayForm(scope.row,1)"> 回复 </el-button>
<el-button size="mini" type="info" plain @click="showReplayForm(scope.row,2)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -40,48 +63,56 @@ ...@@ -40,48 +63,56 @@
:current-page.sync="msg.pageIndex" layout="prev, pager, next" :total="total"> :current-page.sync="msg.pageIndex" layout="prev, pager, next" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<!-- 修改版权 --> <!-- 回复 -->
<el-dialog :title="editTitle" :visible.sync="isShowCategoryForm" width="500px"> <el-dialog :title="editTitle" :visible.sync="isShowReplayForm" width="600px">
<el-form label-width="150px"> <el-form label-width="150px">
<el-form-item label="分类名称"> <el-form-item label="咨询用户">
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="postMsg.Name"> {{replayMsg.UserName}}
</el-input> </el-form-item>
<el-form-item label="咨询时间">
{{replayMsg.CreateDate}}
</el-form-item>
<el-form-item label="咨询分类">
{{replayMsg.CategoryName}}
</el-form-item> </el-form-item>
<el-form-item label="Logo"> <el-form-item label="咨询品牌">
<div> {{replayMsg.BrandName}}
<el-button @click="openChangeDig()" size="small">选择文件</el-button> </el-form-item>
<el-form-item label="商品图片">
<div class="indexApp_image" v-for="(item,index) in replayMsg.GoodsImgList" :key="index">
<img v-if="item.Path" :src="item.Path" alt="" style="width:100px;height:100px;" /><br />
{{item.Name}}
</div> </div>
<div class="indexApp_image"> </el-form-item>
<img v-if="postMsg.Image" :src="postMsg.Image" alt="" style="width:100px;height:100px;" /> <el-form-item label="更多照片">
<div class="indexApp_image" v-for="(item,index) in replayMsg.MoreImgList" :key="index">
<img v-if="item.Path" :src="item.Path" alt="" style="width:100px;height:100px;" /><br />
{{item.Name}}
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="启用状态" prop="name"> <el-form-item label="备注信息">
<el-radio v-model="postMsg.Enable" :label="1">启用</el-radio> {{ replayMsg.Remark}}
<el-radio v-model="postMsg.Enable" :label="2">禁用</el-radio>
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="回复内容">
<el-input style="width:250px" size="small" maxlength="200" v-model="postMsg.Sort"> <template v-if="showType==1">
</el-input> <el-input style="width:250px" size="small" maxlength="200" v-model="replayMsg.ReplyContent">
</el-input>
</template>
<template v-else>
{{replayMsg.ReplyContent}}
</template>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowCategoryForm = false">取 消</el-button> <el-button size="small" @click="isShowReplayForm = false">取 消</el-button>
<el-button size="small" type="primary" @click="saveData()">确 定</el-button> <el-button size="small" type="primary" @click="saveData()" v-if="showType==1">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 选择文件 -->
<el-dialog title="选择文件" :visible.sync="isShowChooseImage" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import ChooseImg from "@/components/global/ChooseImg.vue";
export default { export default {
components: {
ChooseImg
},
data() { data() {
return { return {
loading: false, loading: false,
...@@ -91,32 +122,72 @@ ...@@ -91,32 +122,72 @@
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
Name: "", Name: "",
CategoryId: "",
BrandId: "",
UserId: "",
IsReply: "",
}, },
dateList: [], //日期 //回复状态
ReplyList: [{
Id: 1,
Name: "已回复"
},
{
Id: 2,
Name: "未回复"
},
],
editTitle: "回复", editTitle: "回复",
postMsg: { //回复信息
Id: 0, replayMsg: {
Name: "", GoodsId: 0,
Image: "", GoodsImgList: [],
Enable: 1, MoreImgList: [],
Sort: 0, ReplyContent: "", //回复内容
Remark: "", //备注信息
CategoryName: "", //分类名称
BrandName: "", //品牌名称
UserName: "", //咨询用户
CreateDate: "", //咨询时间
}, },
isShowCategoryForm: false, isShowCategoryForm: false,
isShowChooseImage: false, isShowChooseImage: false,
CategoryList: [], //分类列表
isShowReplayForm: false, //是否显示回复弹窗
showType: 1, //回复类型(1-回复,2-查看)
} }
}, },
created() {}, created() {
this.getCategoryList()
},
mounted() { mounted() {
this.getList(); this.getList();
}, },
methods: { methods: {
openChangeDig() { showReplayForm(item, showType) {
this.isShowChooseImage = true; this.replayMsg.GoodsId = item.Id;
this.replayMsg.GoodsImgList = item.GoodsImgList;
this.replayMsg.MoreImgList = item.MoreImgList;
this.replayMsg.Remark = item.Remark;
this.replayMsg.CategoryName = item.CategoryName;
this.replayMsg.BrandName = item.BrandName;
this.replayMsg.UserName = item.UserName;
this.replayMsg.CreateDate = item.CreateDate;
this.showType = showType;
if (this.showType == 2) {
this.replayMsg.ReplyContent = item.ReplyContent;
}
this.isShowReplayForm = true;
}, },
SelectId(msg) { //获取分类列表
let url = this.getIconLink(msg.url) getCategoryList() {
this.postMsg.Image = url this.apipost("/api/Assess/GetCategoryDropList", {}, res => {
this.isShowChooseImage = false; if (res.data.resultCode == 1) {
this.CategoryList = res.data.data;
} else {
this.Error(res.data.message);
}
})
}, },
//获取数据 //获取数据
getList() { getList() {
...@@ -136,11 +207,11 @@ ...@@ -136,11 +207,11 @@
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
//设置咨询回复
//新增修改分类
saveData() { saveData() {
this.assetsApipost("/api/Assess/GetGoodsPageList", this.postMsg, res => { this.assetsApipost("/api/Assess/SetGoodsReply", this.replayMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.isShowReplayForm = false;
this.Success(res.data.message); this.Success(res.data.message);
this.getList(); this.getList();
} else { } else {
...@@ -148,25 +219,7 @@ ...@@ -148,25 +219,7 @@
} }
}) })
}, },
//删除分类
RemmoveCategory(item) {
let that = this;
that.Confirm("是否删除此分类?", function () {
that.apipost(
"/api/Assess/DelCategoryInfo", {
CategoryId: item.Id,
},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
);
});
}
} }
}; };
</script> </script>
......
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
pageSize: 15, pageSize: 15,
CategoryId: 0, //分类编号 CategoryId: 0, //分类编号
Name: '', //品牌名称 Name: '', //品牌名称
}, },
CategoryList: [], //分类列表 CategoryList: [], //分类列表
dateList: [], //日期 dateList: [], //日期
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
:current-page.sync="msg.pageIndex" layout="prev, pager, next" :total="total"> :current-page.sync="msg.pageIndex" layout="prev, pager, next" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<!-- 修改版权 --> <!-- 修改分类 -->
<el-dialog :title="editTitle" :visible.sync="isShowCategoryForm" width="500px"> <el-dialog :title="editTitle" :visible.sync="isShowCategoryForm" width="500px">
<el-form label-width="150px"> <el-form label-width="150px">
<el-form-item label="分类名称"> <el-form-item label="分类名称">
......
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