| | |
| | | }, |
| | | {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(); |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看订单详情 |
| | | */ |
| | |
| | | content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_orderDetail/' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }else if(orderType == 2){ |
| | | console.log("直通车出行订单详情"); |
| | | }else if(orderType == 3){ |
| | | console.log("跨城出行订单详情"); |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '直通车出行订单详情', |
| | | title: '跨城出行订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |