Pu Zhibing
2025-07-30 d04bcbfa85b97e4444bac2a66bbee611d05f0f0e
ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tAbnormalOrderCar/tAbnormalOrder_orderDetail.html
@@ -160,7 +160,11 @@
<body>
     <input type="hidden" id="orderNum"  name ="orderNum" value="${item.orderNum}"/>
     <input type="hidden" id="state"  name ="state" value="${item.abnormalStatus}"/>
     <input type="hidden" id="show"  name ="show" value="${show}"/>
     <input type="hidden" id="type" name ="type" value="${type}"/>
     <input type="hidden" id="orderId" name ="orderId" value="${item.id}"/>
     <input type="hidden" id="payMoney" name ="payMoney" value="${item.payMoney}"/>
     <div class="ibox float-e-margins">
        <div class="title">处理异常订单</div>
        <div class="section-title">订单信息</div>
@@ -231,7 +235,7 @@
                        未知
                        @}
                    </td>
                    <td><a class="order-link" href="#">查看订单详情</a></td>
                    <td><a class="order-link" onclick="viewOrderInfo()">查看订单详情</a></td>
                </tr>
            </tbody>
        </table>
@@ -248,8 +252,15 @@
            @}
        </div>
        <!-- 你可以根据实际图片地址替换上面src -->
         <div class="section-title" id="s1">处理状态:
            @if(item.abnormalStatus==1){
             未处理  <button id="saveBtn1" class="action-btn" onclick="saveBtn1()">立即处理</button>
             @}else{
             已处理
             @}
         </div>
        <!-- 其他内容可根据实际需求继续补充 -->
         <div id="s2">
        <div class="section-title">选择责任方</div>
        <div id="duty-selector">
            <button type="button" class="duty-btn active" data-type="platformAll">平台全责</button>
@@ -270,10 +281,10 @@
        <div id="action-btns">
            <button id="saveBtn" class="action-btn" onclick="save()" style="display:none;">确认处理</button>
            <button id="closeBtn" class="action-btn" style="display:none;">关闭</button>
          </div>
        </div>
         </div>
    </div>
</body>
<script>
    const dutyContent = document.getElementById('duty-content');
@@ -294,8 +305,8 @@
                        <label><input type="radio" name="ybj" disabled>否</label>
                    </div>
                    <div class="radio-group">超时是否生成追偿支付单:
                          <label><input type="radio" name="zcpay" checked disabled>是</label>
                         <label><input type="radio" name="zcpay" disabled>否</label>
                          <label><input type="radio" name="zcpay"  disabled>是</label>
                         <label><input type="radio" name="zcpay" checked disabled>否</label>
                        </div>
                </div>
            `;
@@ -325,7 +336,7 @@
                    <label><input type="radio" name="zcpay" disabled>否</label>
                </div>
                <div style="margin-top:10px;">
                    新增修改订单金额为:<input type="number" id="money" name="money" style="width:100px;"  value="${money}"> 元
                    修改订单金额为:<input type="number" id="money" name="money" style="width:100px;"  value="${money}"> 元(需小于等于原订单金额)
                </div>
            `;
        }
@@ -338,6 +349,8 @@
        btn.disabled = true;
        if (btn.dataset.type === typeMap[responsibilityType]) {
          btn.classList.add('active');
        }else {
            btn.style.display = 'none';
        }
      });
      renderContent(typeMap[responsibilityType], true);
@@ -356,6 +369,10 @@
      document.getElementById('closeBtn').style.display = 'none';
    }
    function saveBtn1() {
        $("#s1").hide();
        $("#s2").show();
    }
    window.onload = function() {
      if (isReadonly) {
        setReadonlyMode();
@@ -380,14 +397,30 @@
         let remark = document.querySelector('textarea[name=handleRemark]').value;
        // 取money
         let money = $("#money").val();
         let payMoney = $("#payMoney").val();
         let type = document.querySelector('input[name=type]').value;
         let orderNum = document.querySelector('input[name=orderNum]').value;
        console.log(type,orderNum)
         console.log(responsibilityTypeVal,money,payMoney)
         if(responsibilityTypeVal>3 && money>payMoney){
             Feng.error("需小于等于原订单金额!");
             return;
         }
        //提交信息
        var ajax = new $ax(Feng.ctxPath + "/abnormal/save", function(data){
            Feng.success("操作成功!");
                // 尝试关闭当前窗口或弹窗
                if(window.parent && window.parent !== window && window.parent.layer) {
                    // layer弹窗
                    var index = window.parent.layer.getFrameIndex(window.name);
                    window.parent.layer.close(index);
                } else if(window.opener) {
                    window.close();
                } else if(window.top && window.top.closeDialog) {
                    window.top.closeDialog();
                } else {
                    window.close();
                }
        },function(data){
            Feng.error("操作失败!");
        });
@@ -414,6 +447,64 @@
        window.close();
      }
    };
//     进来就加载
    $(function() {
       var state = $("#state").val();
       var show = $("#show").val();
        if(state==1 && show==0){
            $("#s2").hide();
        }
        if(show==1){
            $("#s2").show();
            $("#s1").hide();
        }
    })
    function viewOrderInfo(){
        var type = $("#type").val();
        var orderId = $("#orderId").val();
        if(type==1){
            var index = layer.open({
                type: 2,
                title: '快车订单详情',
                area: ['100%', '100%'], //宽高
                fix: false, //不固定
                maxmin: true,
                content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_orderDetail/' +orderId
            });
            this.layerIndex = index;
        }
        if(type==2){
            var index = layer.open({
                type: 2,
                title: '跨城出行订单详情',
                area: ['100%', '100%'], //宽高
                fix: false, //不固定
                maxmin: true,
                content: Feng.ctxPath + '/tOrderCrossCity/tOrderCrossCity_detail/' + orderId
            });
            this.layerIndex = index;
        }
        if(type==3){
            var index = layer.open({
                type: 2,
                title: '出租车订单详情',
                area: ['100%', '100%'], //宽高
                fix: false, //不固定
                maxmin: true,
                content: Feng.ctxPath + '/tOrderTaxi/tOrderTaxi_update/' + orderId
            });
            this.layerIndex = index;
        }
    }
</script>
</html>