添加转单功能,技师上下线,项目评价

This commit is contained in:
yangjun 2024-07-09 14:35:04 +08:00
parent 17d5dd8d6b
commit 5413a5062f
3 changed files with 197 additions and 6 deletions

View File

@ -219,10 +219,10 @@
>上线</span
>
<span style="color: #ff4949" v-else>休息</span>
<!-- <el-switch v-model="scope.row.status" @change="changeS(scope.row.status,scope.row.userId)"
<el-switch v-model="scope.row.status" @change="changeS(scope.row.status,scope.row.userId)"
:active-value="openValue" :disabled="!isAuth('locality:update')"
:inactive-value="closeValue" active-color="#13ce66" inactive-color="#ff4949">
</el-switch> -->
</el-switch>
</template>
</el-table-column>
<el-table-column

View File

@ -191,7 +191,7 @@
</el-table-column>
<!-- <el-table-column prop="createTime" label="创建时间">
</el-table-column> -->
<el-table-column label="操作" prop="id" width="360" fixed="right">
<el-table-column label="操作" prop="id" width="260" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@ -223,6 +223,13 @@
@click="classdelete(scope.row)"
>删除
</el-button>
<el-button
size="mini"
type="primary"
style="margin: 5px"
@click="handleAddpl(scope.row)"
>新增评论
</el-button>
</template>
</el-table-column>
</el-table>
@ -1802,6 +1809,23 @@
</el-pagination>
</div>
</el-dialog>
<el-dialog title="新增评论" :visible.sync="dialogSaveVisible" center>
<el-form :model="saveForm">
<el-form-item label="内容" :label-width="formLabelWidth">
<el-input v-model="saveForm.content" type="textarea" style="width:65%;" > </el-input>
</el-form-item>
<el-form-item label="评分" :label-width="formLabelWidth">
<el-input v-model="saveForm.score" type="number" :max="5" style="width:65%;" > </el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogSaveVisible = false"> </el-button>
<el-button type="primary" @click="handelQueren()"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -1899,6 +1923,7 @@ export default {
dialogFormVisible9: false,
dialogFormVisible10: false,
dialogFormVisible11: false,
dialogSaveVisible: false,
homeData: [],
homeData1: [
{
@ -2080,9 +2105,41 @@ export default {
materialId: "",
materialPackageClassifyId: "",
getMaterialPackageDataOfRow: {},
//
saveForm:{
massageTypeId: '',
content: '',
score: ''
},
plmassageTypeId:'',
};
},
methods: {
handleAddpl(record){
this.dialogSaveVisible = true;
this.plmassageTypeId = record.massageTypeId;
this.saveForm = {
massageTypeId: '',
content: '',
score: ''
}
},
//
handelQueren(){
this.$http({
url: this.$http.adornUrl('takingComment/insertTaking'),
method: 'post',
params: this.$http.adornParams({
'content': this.saveForm.content,
'score': this.saveForm.score,
'massageTypeId': this.plmassageTypeId,
})
}).then(({ data }) => {
this.dialogSaveVisible = false;
this.classSelect();
})
},
//
getDictLabel(val){
var list = this.materialPackageType;

View File

@ -135,12 +135,12 @@
</el-table-column>
<el-table-column prop="price" label="项目类型">
<template slot-scope="scope">
<span v-if="scope.row.ordersMassageList&&scope.row.ordersMassageList[0].massageType">{{ scope.row.ordersMassageList[0].massageType.classifyName }}</span>
<span v-if="scope.row.ordersMassageList.length>0&&scope.row.ordersMassageList[0].massageType">{{ scope.row.ordersMassageList[0].massageType.classifyName }}</span>
</template>
</el-table-column>
<el-table-column prop="price" label="项目名称">
<template slot-scope="scope">
<span v-if="scope.row.ordersMassageList&&scope.row.ordersMassageList[0].massageType">{{ scope.row.ordersMassageList[0].massageType.title }}</span>
<span v-if="scope.row.ordersMassageList.length>0&&scope.row.ordersMassageList[0].massageType">{{ scope.row.ordersMassageList[0].massageType.title }}</span>
</template>
</el-table-column>
@ -309,6 +309,9 @@
<span style="color: red;" v-if="scope.row.status==6">服务中</span>
<span style="color: #E87D0D;" v-if="scope.row.status==7">师傅出发</span>
<span style="color: #E87D0D;" v-if="scope.row.status==8">师傅到达</span>
<span style="color: #E87D0D;" v-if="scope.row.status==9">待确认</span>
<span style="color: #E87D0D;" v-if="scope.row.status==10">待补单</span>
<span style="color: #E87D0D;" v-if="scope.row.status==11">挂单</span>
</template>
</el-table-column>
<el-table-column prop="shopPhone" label="商家电话">
@ -334,6 +337,11 @@
@click="deletes(scope.row)" style="margin:5px;">删除</el-button>
<el-button style="margin:5px;" size="mini" type="warning" icon="document" :disabled="!isAuth('orderCenter:tuikuan')" @click="tuikuanBtnBf(scope.row)" v-if="scope.row.status!=1&&scope.row.status!=4&&scope.row.status!=3&&scope.row.status!=5">部分退款
</el-button>
<!-- 状态 1待支付 2待服务 3待评论 4已取消 5已完成 6进行中 7技师出发 8技师到达 9用户已支付技师待接单 10待补单 11原单挂单 -->
<el-button style="margin:5px;" size="mini" type="primary" icon="document" v-if="scope.row.status==2||scope.row.status==6||scope.row.status==7||scope.row.status==8||scope.row.status==9"
@click="handleZhuandan(scope.row)">转单 </el-button>
</template>
</el-table-column>
</el-table>
@ -477,6 +485,50 @@
<el-button type="primary" @click="replyNoticeKk()"> </el-button>
</div>
</el-dialog>
<!-- 技师列表 -->
<el-dialog title="选择师傅" :visible.sync="artificerVisible" 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>
</template>
@ -871,7 +923,13 @@
},
],
times:'',
bili:0
bili:0,
choicenData: [],
artificerVisible:false,
jishipage:1,
jishisize:10,
phoneT:'',
jszdOrderId:'',
}
},
methods: {
@ -931,7 +989,83 @@
magNotice() {
this.dialogFormVisible2 = true
},
//
handleZhuandan(record){
this.jszdOrderId = record.ordersId;
this.artificerVisible = true;
this.handleSelJishi();
},
//
handleJsqueren(record){
this.artificerVisible = false;
this.$http({
url: this.$http.adornUrl(`artificer/jszd`),
method: "get",
params: this.$http.adornParams({
artificerId: record.artificerId,
orderId: this.jszdOrderId,
}),
}).then(({ data }) => {
console.log(`🚀 ~ handleJsqueren ~ data:`, data)
if(data.code==200){
this.$message({
message: '转单成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
this.dataSelect();
});
},
//
handleSizeChange1(val) {
this.jishisize = val;
this.handleSelJishi();
},
//
handleCurrentChange1(val) {
this.jishipage = val;
this.handleSelJishi();
},
//
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);
});
},
//
dataSelect() {
var endTime=this.endTime