新增技师评论功能
This commit is contained in:
parent
8bbfa93395
commit
e79da85247
|
@ -25,6 +25,8 @@
|
|||
</el-button>
|
||||
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="refresh">刷新
|
||||
</el-button>
|
||||
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="handleAdd">新增
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table v-loading="tableDataLoading" :data="tableData.list">
|
||||
<el-table-column prop="id" label="编号" width="80">
|
||||
|
@ -174,6 +176,76 @@
|
|||
<el-button type="primary" @click="replyNoticeTo()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
<el-dialog title="新增评论" :visible.sync="dialogSaveVisible" center>
|
||||
<el-form :model="saveForm">
|
||||
<el-input v-model="saveForm.artificerId" type="text" style="width:65%;" hidden> </el-input>
|
||||
<el-form-item label="技师" :label-width="formLabelWidth">
|
||||
<el-input v-model="saveForm.artificerName" type="text" style="width:65%;" > </el-input>
|
||||
<el-button type="primary" @click="handleCheckJishi()">选择技师</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" :label-width="formLabelWidth">
|
||||
<el-input v-model="saveForm.content" type="text" style="width:65%;" > </el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="评分" :label-width="formLabelWidth">
|
||||
<el-input v-model="saveForm.score" type="number" style="width:65%;" > </el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handelQueren()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog title="选择师傅" :visible.sync="dialogChkjsVisible" center top="">
|
||||
<div>
|
||||
<div style="position: relative; margin: 5px">
|
||||
<span style="position: relative; ">
|
||||
<span>师傅名称:</span>
|
||||
<el-input style="width: 200px" placeholder="请输入师傅名称" v-model="artificerName" ></el-input>
|
||||
</span>
|
||||
<span style="position: relative; display: inline-block">
|
||||
<span>手机号:</span>
|
||||
<el-input style="width: 200px" placeholder="请输入手机号" v-model="phoneT" ></el-input>
|
||||
</span>
|
||||
<el-button style="margin: 10px" size="mini" type="primary" icon="document" @click="handleSelJishi" >查询</el-button>
|
||||
</div>
|
||||
<div style="float: right; margin-right: 2%"></div>
|
||||
<el-table v-loading="tableDataLoading" :data="choicenData.list">
|
||||
<el-table-column prop="artificerId" label="编号" width="80" fixed="left" > </el-table-column>
|
||||
<el-table-column prop="classifyName" label="项目类型" width="150"> </el-table-column>
|
||||
<el-table-column prop="artificerName" label="师傅名称" fixed="left"></el-table-column>
|
||||
<el-table-column prop="phone" width="120" label="手机号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.phone ? scope.row.phone : "未绑定" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" prop="id" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="warning" style="margin: 5px" @click="handleJsqueren(scope.row)" >确认 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center; float: right">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="jishisize"
|
||||
:current-page="jishipage"
|
||||
layout="total,sizes, prev, pager, next,jumper"
|
||||
:total="choicenData.totalCount"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -185,6 +257,11 @@
|
|||
size: 10,
|
||||
page: 1,
|
||||
goodsId: '',
|
||||
artificerName: '',
|
||||
phoneT: '',
|
||||
choicenData: [],
|
||||
jishipage:1,
|
||||
jishisize:10,
|
||||
form: {
|
||||
commentId: '',
|
||||
reply: ''
|
||||
|
@ -207,6 +284,16 @@
|
|||
label: '差评'
|
||||
}
|
||||
],
|
||||
//新增内容
|
||||
saveForm:{
|
||||
userId: '',
|
||||
artificerId: '',
|
||||
orderId: '',
|
||||
content: '',
|
||||
score: ''
|
||||
},
|
||||
dialogSaveVisible:false,
|
||||
dialogChkjsVisible:false,
|
||||
formLabelWidth: '200px',
|
||||
tableDataLoading: false,
|
||||
dialogFormVisible: false,
|
||||
|
@ -220,6 +307,74 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
//新增
|
||||
handleAdd(){
|
||||
this.dialogSaveVisible = true;
|
||||
this.saveForm = {};
|
||||
},
|
||||
//选择技师
|
||||
handleCheckJishi(){
|
||||
this.dialogChkjsVisible = true;
|
||||
this.handleSelJishi();
|
||||
},
|
||||
//新增评论保存
|
||||
handelQueren(){
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('takingComment/insertTaking'),
|
||||
method: 'post',
|
||||
params: this.$http.adornParams({
|
||||
'page': 1,
|
||||
'limit': this.size,
|
||||
'artificerId': this.saveForm.artificerId,
|
||||
'content': this.saveForm.content,
|
||||
'score': this.saveForm.score
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
this.dialogSaveVisible = false;
|
||||
this.dataSelect();
|
||||
})
|
||||
},
|
||||
//技师查询
|
||||
handleSelJishi(){
|
||||
this.userId = this.$store.state.user.id;
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`artificer/selectArtificerList`),
|
||||
method: "get",
|
||||
params: this.$http.adornParams({
|
||||
page: this.jishipage,
|
||||
limit: this.jishisize,
|
||||
artificerName: this.artificerName,
|
||||
massageTypeId: "",
|
||||
longitude: "",
|
||||
latitude: "",
|
||||
city: "",
|
||||
classifyId: "",
|
||||
phone: this.phoneT,
|
||||
authentication: 2,
|
||||
}),
|
||||
}).then(({ data }) => {
|
||||
this.tableDataLoading = false;
|
||||
let returnData = data.data;
|
||||
this.choicenData = returnData;
|
||||
console.log(this.choicenData);
|
||||
});
|
||||
},
|
||||
//技师确认选择
|
||||
handleJsqueren(record){
|
||||
this.saveForm.artificerId = record.artificerId;
|
||||
this.saveForm.artificerName = record.artificerName;
|
||||
this.dialogChkjsVisible = false;
|
||||
},
|
||||
//技师列表更换页数
|
||||
handleSizeChange1(val) {
|
||||
this.jishisize = val;
|
||||
this.handleSelJishi();
|
||||
},
|
||||
//技师翻页
|
||||
handleCurrentChange1(val) {
|
||||
this.jishipage = val;
|
||||
this.handleSelJishi();
|
||||
},
|
||||
// 返回上一级
|
||||
prev() {
|
||||
this.$router.back()
|
||||
|
@ -444,4 +599,8 @@
|
|||
</script>
|
||||
|
||||
<style>
|
||||
.el-dialog--center {
|
||||
text-align: center;
|
||||
margin-top: 1vh !important;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue