盛安新版本问题优化-评价

This commit is contained in:
曹磊 2024-11-06 16:08:00 +08:00
parent e82d976682
commit 5dd980b88c
1 changed files with 90 additions and 7 deletions

View File

@ -344,8 +344,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button style="margin:5px;" size="mini" type="primary" icon="document" @click="selectBtn(scope.row)">加钟记录--> <!-- <el-button style="margin:5px;" size="mini" type="primary" icon="document" @click="selectBtn(scope.row)">加钟记录-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button style="margin:5px;" size="mini" type="primary" icon="document" @click="pingjiaBtn(scope.row)" plain>评价 <el-button style="margin:5px;" size="mini" type="primary" icon="document" v-if="scope.row.status==3" @click="pingjiaBtn(scope.row)" plain>评价
</el-button>--> </el-button>
<!-- 状态 1待支付 2待服务 3待评论 4已取消 5已完成 6进行中 7技师出发 8技师到达 9用户已支付技师待接单 10待补单 11原单挂单 --> <!-- 状态 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" <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> @click="handleZhuandan(scope.row)">转单 </el-button>
@ -426,6 +426,9 @@
</el-dialog> </el-dialog>
<!-- 评价记录 --> <!-- 评价记录 -->
<el-dialog title="评价记录" :visible.sync="dialogFormVisiblePj" center> <el-dialog title="评价记录" :visible.sync="dialogFormVisiblePj" center>
<div style="position: relative; margin: 5px">
<el-button style="margin: 10px" size="mini" type="primary" icon="document" @click="addPj" v-if="pjCanAdd">添加评价</el-button>
</div>
<el-table v-loading="tableDataLoading1" :data="jiazhongData"> <el-table v-loading="tableDataLoading1" :data="jiazhongData">
<el-table-column prop="id" label="编号" width="80"> <el-table-column prop="id" label="编号" width="80">
</el-table-column> </el-table-column>
@ -437,6 +440,35 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
<el-dialog title="添加评价" :visible.sync="pjDialogFormVisible" center>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right"
>评价内容</span
>
<el-input
style="width: 50%"
v-model="pjContent"
type="textarea"
:rows="4"
placeholder="请输入评价内容"
>
</el-input>
</div>
<div style="margin-bottom: 10px">
<span style="width: 200px; display: inline-block; text-align: right">订单评分</span>
<el-select clearable v-model="pjScore" style="width: 50%">
<el-option key="1" label="1分" value="1"></el-option>
<el-option key="2" label="2分" value="2"></el-option>
<el-option key="3" label="3分" value="3"></el-option>
<el-option key="4" label="4分" value="4"></el-option>
<el-option key="5" label="5分" value="5"></el-option>
</el-select>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="pjDialogFormVisible = false"> </el-button>
<el-button type="primary" @click="submitPj"> </el-button>
</div>
</el-dialog>
<!-- 修改备注时间 --> <!-- 修改备注时间 -->
<el-dialog title="修改备注时间" :visible.sync="dialogFormVisibleBz" center> <el-dialog title="修改备注时间" :visible.sync="dialogFormVisibleBz" center>
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
@ -649,6 +681,7 @@
dialogFormVisibleJz:false, dialogFormVisibleJz:false,
jiazhongData:[], jiazhongData:[],
dialogFormVisiblePj:false, dialogFormVisiblePj:false,
pjDialogFormVisible:false,
tableDataLoading1:false, tableDataLoading1:false,
totalMoney: 0, totalMoney: 0,
totalMoneyS:0, totalMoneyS:0,
@ -947,7 +980,12 @@
jishisize:10, jishisize:10,
phoneT:'', phoneT:'',
jszdOrderId:'', jszdOrderId:'',
isCollapsed: false isCollapsed: false,
pjCanAdd: true,
pjOrdersId: '',
pjArtificerId: '',
pjContent: '',
pjScore: '',
} }
}, },
methods: { methods: {
@ -1264,6 +1302,11 @@
}, },
// //
pingjiaBtn(row){ pingjiaBtn(row){
this.pjCanAdd = true;
if(row){
this.pjOrdersId = row.ordersId
this.pjArtificerId = row.artificerId
}
this.dialogFormVisiblePj = true this.dialogFormVisiblePj = true
this.tableDataLoading1 = true this.tableDataLoading1 = true
this.jiazhongData = [] this.jiazhongData = []
@ -1271,7 +1314,7 @@
url: this.$http.adornUrl('takingComment/selectOrderTakingCommentByOrdersId'), url: this.$http.adornUrl('takingComment/selectOrderTakingCommentByOrdersId'),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
'ordersId':row.ordersId 'ordersId':this.pjOrdersId
}) })
}).then(({ }).then(({
data data
@ -1279,10 +1322,49 @@
this.tableDataLoading1 = false this.tableDataLoading1 = false
if(data.data){ if(data.data){
let returnData = data.data; let returnData = data.data;
this.jiazhongData.push(returnData) this.jiazhongData.push(returnData);
if(this.jiazhongData.length>0){
this.pjCanAdd = false;
}
}
})
},
//
addPj(){
this.pjContent = "";
this.pjScore = "5";
this.pjDialogFormVisible = true;
},
submitPj(){
this.$http({
url: this.$http.adornUrl('takingComment/addGoodsNum'),
method: 'post',
params: this.$http.adornParams({
orderId:this.pjOrdersId,
content: this.pjContent,
score: this.pjScore,
artificerId: this.pjArtificerId,
})
}).then(({data}) => {
if(data.code==0){
this.pjDialogFormVisible = false;
this.$message({
message: '评价成功',
type: 'success',
duration: 1500,
onClose: () => {
this.pingjiaBtn(null);
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
} }
console.log(this.tableDataLoading1)
}) })
}, },
// 退 // 退
@ -1620,6 +1702,7 @@
} }
}) })
}, },
}, },
mounted() { mounted() {
this.dataSelect() this.dataSelect()