| | |
| | | }, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:'16%', |
| | | formatter: function (value, row) { |
| | | return '<a href="#" onclick="TOrderTape.orderDetail('+row.orderId+','+row.orderType+')" style="color:cornflowerblue">查看订单</a>' +' ' + |
| | | '<a href="#" onclick="TOrderTape.openTCharteredServiceDetail('+row.id+')" style="color:cornflowerblue">播放录音</a>' +' ' + |
| | | '<a href="#" onclick="TOrderTape.delete('+row.id+')" style="color:cornflowerblue">删除</a>' |
| | | if(row.state == 1) { |
| | | return '<a href="#" onclick="TOrderTape.orderDetail('+row.orderId+','+row.orderType+')" style="color:cornflowerblue">查看订单</a>' +' ' + |
| | | '<a href="#" onclick="TOrderTape.playAudio('+row.id+')" style="color:cornflowerblue">播放录音</a>' +' ' + |
| | | '<a href="#" onclick="TOrderTape.delete('+row.id+')" style="color:cornflowerblue">删除</a>' |
| | | }else { |
| | | return '<a href="#" onclick="TOrderTape.orderDetail('+row.orderId+','+row.orderType+')" style="color:cornflowerblue">查看订单</a>' +' ' + |
| | | '<a href="#" onclick="TOrderTape.delete('+row.id+')" style="color:cornflowerblue">删除</a>' |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | |
| | | } |
| | | }; |
| | | |
| | | TOrderTape.playAudio = function (id) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderTape/getDetailById", function (data) { |
| | | console.log(data.data) |
| | | var audio = document.getElementById('recording'); |
| | | audio.setAttribute("src", data.data.fileLink); |
| | | if (audio.paused) { |
| | | audio.play(); // 播放录音 |
| | | } else { |
| | | audio.pause(); // 如果正在播放,则暂停 |
| | | } |
| | | }, function (data) { |
| | | console.log(data); |
| | | }); |
| | | ajax.set("tOrderTapeId", id); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看订单详情 |
| | | */ |