盛安新版本问题优化-评价
This commit is contained in:
parent
e82d976682
commit
5dd980b88c
|
@ -344,8 +344,8 @@
|
|||
<template slot-scope="scope">
|
||||
<!-- <el-button style="margin:5px;" size="mini" type="primary" icon="document" @click="selectBtn(scope.row)">加钟记录-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button style="margin:5px;" size="mini" type="primary" icon="document" @click="pingjiaBtn(scope.row)" plain>评价
|
||||
</el-button>-->
|
||||
<el-button style="margin:5px;" size="mini" type="primary" icon="document" v-if="scope.row.status==3" @click="pingjiaBtn(scope.row)" plain>评价
|
||||
</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>
|
||||
|
@ -426,6 +426,9 @@
|
|||
</el-dialog>
|
||||
<!-- 评价记录 -->
|
||||
<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-column prop="id" label="编号" width="80">
|
||||
</el-table-column>
|
||||
|
@ -437,6 +440,35 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</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>
|
||||
<div style="margin-bottom: 10px;">
|
||||
|
@ -649,6 +681,7 @@
|
|||
dialogFormVisibleJz:false,
|
||||
jiazhongData:[],
|
||||
dialogFormVisiblePj:false,
|
||||
pjDialogFormVisible:false,
|
||||
tableDataLoading1:false,
|
||||
totalMoney: 0,
|
||||
totalMoneyS:0,
|
||||
|
@ -947,7 +980,12 @@
|
|||
jishisize:10,
|
||||
phoneT:'',
|
||||
jszdOrderId:'',
|
||||
isCollapsed: false
|
||||
isCollapsed: false,
|
||||
pjCanAdd: true,
|
||||
pjOrdersId: '',
|
||||
pjArtificerId: '',
|
||||
pjContent: '',
|
||||
pjScore: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -1264,6 +1302,11 @@
|
|||
},
|
||||
// 订单评价
|
||||
pingjiaBtn(row){
|
||||
this.pjCanAdd = true;
|
||||
if(row){
|
||||
this.pjOrdersId = row.ordersId
|
||||
this.pjArtificerId = row.artificerId
|
||||
}
|
||||
this.dialogFormVisiblePj = true
|
||||
this.tableDataLoading1 = true
|
||||
this.jiazhongData = []
|
||||
|
@ -1271,7 +1314,7 @@
|
|||
url: this.$http.adornUrl('takingComment/selectOrderTakingCommentByOrdersId'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'ordersId':row.ordersId
|
||||
'ordersId':this.pjOrdersId
|
||||
})
|
||||
}).then(({
|
||||
data
|
||||
|
@ -1279,10 +1322,49 @@
|
|||
this.tableDataLoading1 = false
|
||||
if(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() {
|
||||
this.dataSelect()
|
||||
|
|
Loading…
Reference in New Issue