新增技师评论功能

This commit is contained in:
yangjun 2024-06-17 09:43:19 +08:00
parent 8bbfa93395
commit e79da85247
1 changed files with 159 additions and 0 deletions

View File

@ -25,6 +25,8 @@
</el-button> </el-button>
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="refresh">刷新 <el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="refresh">刷新
</el-button> </el-button>
<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="handleAdd">新增
</el-button>
</div> </div>
<el-table v-loading="tableDataLoading" :data="tableData.list"> <el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column prop="id" label="编号" width="80"> <el-table-column prop="id" label="编号" width="80">
@ -174,6 +176,76 @@
<el-button type="primary" @click="replyNoticeTo()"> </el-button> <el-button type="primary" @click="replyNoticeTo()"> </el-button>
</div> </div>
</el-dialog> </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>&nbsp;&nbsp;
</span>
<span style="position: relative; display: inline-block">
<span>手机号</span>
<el-input style="width: 200px" placeholder="请输入手机号" v-model="phoneT" ></el-input>&nbsp;&nbsp;
</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> </el-tabs>
</div> </div>
</template> </template>
@ -185,6 +257,11 @@
size: 10, size: 10,
page: 1, page: 1,
goodsId: '', goodsId: '',
artificerName: '',
phoneT: '',
choicenData: [],
jishipage:1,
jishisize:10,
form: { form: {
commentId: '', commentId: '',
reply: '' reply: ''
@ -207,6 +284,16 @@
label: '差评' label: '差评'
} }
], ],
//
saveForm:{
userId: '',
artificerId: '',
orderId: '',
content: '',
score: ''
},
dialogSaveVisible:false,
dialogChkjsVisible:false,
formLabelWidth: '200px', formLabelWidth: '200px',
tableDataLoading: false, tableDataLoading: false,
dialogFormVisible: false, dialogFormVisible: false,
@ -220,6 +307,74 @@
} }
}, },
methods: { 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() { prev() {
this.$router.back() this.$router.back()
@ -444,4 +599,8 @@
</script> </script>
<style> <style>
.el-dialog--center {
text-align: center;
margin-top: 1vh !important;
}
</style> </style>