Ver Fonte

更新优化

zhang song há 6 anos atrás
pai
commit
624c8ece51

+ 3 - 3
src/components/fullPay.vue

@@ -2,9 +2,9 @@
     <div id="table">
         <el-row>
             <el-col :span="24">
-                <el-input v-model="queryData.orderNumber" placeholder="请输入订单号" style="width: 200px"></el-input>
-                <el-input v-model="queryData.name" placeholder="请输入购车人" style="width: 200px"></el-input>
-                <el-input v-model="queryData.mobile" placeholder="请输入购车人手机号" style="width: 200px"></el-input>
+                <el-input v-model="queryData.orderNumber" placeholder="订单号" style="width: 150px"></el-input>
+                <el-input v-model="queryData.name" placeholder="购车人" style="width: 150px"></el-input>
+                <el-input v-model="queryData.mobile" placeholder="购车人手机号" style="width: 150px"></el-input>
                 <el-select v-model="queryData.status" filterable placeholder="请选择订单状态">
                     <el-option
                             v-for="item in orderStatus"

+ 14 - 7
src/components/home.vue

@@ -15,6 +15,10 @@
                         <i class="el-icon-menu"></i>
                         <span slot="title">贷款订单</span>
                     </el-menu-item>
+                    <el-menu-item :index="3" @click="showMenu(3)">
+                        <i class="el-icon-menu"></i>
+                        <span slot="title">退订订单</span>
+                    </el-menu-item>
                 </el-menu>
 
             </el-aside>
@@ -27,8 +31,7 @@
                 <el-main class="main">
                     <p class="tiptxt">{{currentMenu}}</p>
                     <div class="maincontent">
-                        <tableView v-show="menuId == 1"></tableView>
-                        <loanPay v-show="menuId== 2"></loanPay>
+                        <router-view ></router-view>
                     </div>
                 </el-main>
             </el-container>
@@ -50,20 +53,24 @@
                 menuId: 1
             };
         },
-        components: {
-            tableView,
-            loanPay
-        },
+        // components: {
+        //     tableView,
+        //     loanPay
+        // },
         methods: {
             showMenu(data) {
                 if (data == 1) {
                     this.menuId = 1;
                     this.currentMenu = "全款订单";
                     this.$router.push({path: "/home/fullPay"});
-                } else {
+                } else if (data ==2 ){
                     this.menuId = 2;
                     this.currentMenu = "贷款订单";
                     this.$router.push({path: "/home/loanPay"});
+                }else {
+                    this.menuId = 3;
+                    this.currentMenu = "退订订单";
+                    this.$router.push({path: "/home/unsubscribe"});
                 }
             },
             logout() {

+ 3 - 3
src/components/loanPay.vue

@@ -2,9 +2,9 @@
     <div id="table">
         <el-row>
             <el-col :span="24">
-                <el-input v-model="queryData.orderNumber" placeholder="请输入订单号" style="width: 200px"></el-input>
-                <el-input v-model="queryData.name" placeholder="请输入购车人" style="width: 200px"></el-input>
-                <el-input v-model="queryData.mobile" placeholder="请输入购车人手机号" style="width: 200px"></el-input>
+                <el-input v-model="queryData.orderNumber" placeholder="订单号" style="width: 150px"></el-input>
+                <el-input v-model="queryData.name" placeholder="购车人" style="width: 150px"></el-input>
+                <el-input v-model="queryData.mobile" placeholder="购车人手机号" style="width: 150px"></el-input>
                 <el-select v-model="queryData.status" filterable placeholder="请选择订单状态">
                     <el-option
                             v-for="item in orderStatus"

+ 1183 - 0
src/components/unsubscribe.vue

@@ -0,0 +1,1183 @@
+<template>
+    <div id="table">
+        <el-row>
+            <el-col :span="24">
+                <el-input v-model="queryData.orderNumber" placeholder="订单号" style="width: 150px"></el-input>
+                <el-input v-model="queryData.name" placeholder="购车人" style="width: 150px"></el-input>
+                <el-input v-model="queryData.mobile" placeholder="购车人手机号" style="width: 150px"></el-input>
+                <el-select v-model="queryData.status" filterable placeholder="请选择订单状态">
+                    <el-option
+                            v-for="item in orderStatus"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                    </el-option>
+                </el-select>
+
+                <el-button type="primary" @click="getRows">搜索</el-button>
+                <el-button type="warning" @click="refreshTable">清空</el-button>
+            </el-col>
+        </el-row>
+        <el-table :data="tableData" ref="table" :height="autoHeight" border stripe v-loading="loading"
+                  style="margin-top: 10px">
+            <el-table-column type="index" label="排序" width="80"></el-table-column>
+            <el-table-column prop="code" label="订单号" width="180"></el-table-column>
+            <el-table-column label="订单状态" width="100">
+                <template slot-scope="scope">
+                    {{scope.row.status == 1?'待支付订金'
+                    :scope.row.status==2?'已支付订金'
+                    :scope.row.status==3?'已完成'
+                    :scope.row.status==4?'取消订单':'退订金完成'}}
+                </template>
+            </el-table-column>
+            <el-table-column label="支付方式">
+                <template slot-scope="scope">{{scope.row.payType==1?'全款':'贷款'}}</template>
+            </el-table-column>
+            <el-table-column label="车型信息" width="100">
+                <template slot-scope="scope">
+                    <el-button type="warning" plain @click="queryCarInfo(scope.row.carJson,scope.$index)">查看</el-button>
+                </template>
+            </el-table-column>
+            <el-table-column label="选配信息" width="100">
+                <template slot-scope="scope">
+                    <el-button type="warning" plain
+                               @click="queryMatchingInfo(scope.row.pickedCarInformation,scope.$index)">查看
+                    </el-button>
+                </template>
+            </el-table-column>
+            <el-table-column prop="carSupplier" label="提车供应商" width="280"></el-table-column>
+            <el-table-column prop="carSupplierNo" label="ERP" width="160"></el-table-column>
+            <el-table-column prop="totalPrice" label="总价"></el-table-column>
+            <el-table-column prop="depositPrice" label="订金"></el-table-column>
+            <el-table-column label="支付订金时间" width="160">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.payDepositTime">{{scope.row.payDepositTime}}</span>
+                </template>
+            </el-table-column>
+
+            <!--            <el-table-column prop="downPaymentPrice" label="首付款"></el-table-column>-->
+            <!--            <el-table-column prop="downPaymentRate" label="首付比例"></el-table-column>-->
+            <!--            <el-table-column prop="realDownPaymentPrice" label="实际首付款"></el-table-column>-->
+            <!--            <el-table-column prop="realDownPaymentRate" label="实际首付比例"></el-table-column>-->
+<!--            <el-table-column prop="finalPaymentPrice" label="尾款"></el-table-column>-->
+            <!--            <el-table-column prop="loanPrice" label="贷款总额"></el-table-column>-->
+            <!--            <el-table-column prop="loanRate" label="贷款利率"></el-table-column>-->
+            <!--            <el-table-column prop="monthlyInstallmentPaymentPrice" label="月供金额"></el-table-column>-->
+            <!--            <el-table-column prop="loanInstalmentCount" label="分期次数"></el-table-column>-->
+
+            <!--            <el-table-column label="贷款状态" width="120">-->
+            <!--                <template slot-scope="scope">{{loanState(scope.row)}}</template>-->
+            <!--            </el-table-column>-->
+
+            <!--            <el-table-column label="首付状态" width="120">-->
+            <!--                <template slot-scope="scope">-->
+            <!--                    {{(scope.row.offlinePayments?scope.row.offlinePayments.downPaymentStatus:"0" == 0)?'未支付':'已支付'}}-->
+            <!--                </template>-->
+            <!--            </el-table-column>-->
+<!--            <el-table-column label="尾款状态" width="120">-->
+<!--                <template slot-scope="scope">-->
+<!--                    {{OfflinePay(scope.row)}}-->
+<!--                </template>-->
+<!--            </el-table-column>-->
+
+            <el-table-column
+                    label="发票信息"
+                    align="center">
+                <template slot-scope="scope">
+                    <button @click="open(scope.row.offlinePayments?scope.row.offlinePayments.invoicePath:'0')">查看图片
+                    </button>
+                </template>
+            </el-table-column>
+
+            <el-table-column
+                    label="交车凭证"
+                    align="center">
+                <template slot-scope="scope">
+                    <button @click="open(scope.row.offlinePayments?scope.row.offlinePayments.deliveryPath:'0')">查看图片
+                    </button>
+                </template>
+            </el-table-column>
+
+            <el-table-column label="线下审核时间" width="160">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.offlineAuditTime">{{scope.row.offlineAuditTime}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="线上审核时间" width="160">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.onlineAuditTime">{{scope.row.onlineAuditTime}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="订单取消时间" width="160">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.orderCancelTime">{{scope.row.orderCancelTime}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="订单完成时间" width="160">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.orderFinishTime">{{scope.row.orderFinishTime}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column prop="pickCity" label="取车城市" width="120"></el-table-column>
+            <el-table-column prop="name" label="购车人姓名" width="100"></el-table-column>
+            <el-table-column prop="mobile" label="购车人联系方式" width="120"></el-table-column>
+            <el-table-column prop="idCard" label="购车人身份证号" width="170"></el-table-column>
+            <!--            <el-table-column label="订单是否发送给金融公司">-->
+            <!--                <template slot-scope="scope">-->
+            <!--                    {{scope.row.isSend == 0?'否' :'是'}}-->
+            <!--                </template>-->
+            <!--            </el-table-column>-->
+            <!--            <el-table-column label="是否被工厂使用过">-->
+            <!--                <template slot-scope="scope">-->
+            <!--                    {{scope.row.isUse == 0?'否' :'是'}}-->
+            <!--                </template>-->
+            <!--            </el-table-column>-->
+
+            <!--            <el-table-column label="金融公司链接地址" width="300">-->
+            <!--                <template slot-scope="scope">-->
+            <!--                    <a v-if="scope.row.url" :href="scope.row.url" target="_blank" class="link">{{scope.row.url}}</a>-->
+            <!--                    <span v-else>无</span>-->
+            <!--                </template>-->
+            <!--            </el-table-column>-->
+
+            <!--            <el-table-column label="取消原因" width="140">-->
+            <!--                <template slot-scope="scope">-->
+            <!--                    {{scope.row.cancelReason == 1?'不需要了'-->
+            <!--                    :scope.row.cancelReason==2?'车辆选配内容错误'-->
+            <!--                    :scope.row.cancelReason==3?'地址信息填写错误':'其他'}}-->
+            <!--                </template>-->
+            <!--            </el-table-column>-->
+
+
+            <el-table-column prop="isRefund" label="是否退款" width="120" fixed="right">
+                <template slot-scope="scope">
+                    <el-button round @click="Detailsofrefund(scope.row.id,scope.row.isRefund)"
+                               v-show="scope.row.isRefund == 1">退款详情
+                    </el-button>
+                    <span v-show="scope.row.isRefund == 0">否</span>
+
+                </template>
+            </el-table-column>
+
+
+            <el-table-column label="操作 " width="160px" fixed="right" align="center">
+                <template slot-scope="scope">
+                    <el-button v-show="scope.row.loanStatus == 4 && scope.row.status==2 " type="primary" size="small"
+                               @click="examine(scope.row,scope.$index)">审核
+                    </el-button>
+                    <el-button
+                            v-show="scope.row.loanStatus == 5 && !scope.row.offlinePayments  && scope.row.isRefund != 1 ||  (scope.row.status==2 &&scope.row.payType==1 &&!scope.row.offlinePayments) "
+                            type="warning"
+                            size="small"
+                            @click="payForBtn(scope.row,scope.$index)">上传尾款发票
+                    </el-button>
+                    <el-button v-show="scope.row.offlinePayments && scope.row.status == 3 &&  (scope.row.offlinePayments.deliveryPath == null || scope.row.offlinePayments.deliveryPath == '')"
+                               type="warning"
+                               size="small"
+                               @click="deliveryVehicles(scope.row,scope.$index)">上传交车图片
+                    </el-button>
+                    <el-button v-show="scope.row.status != '3' && scope.row.isRefund == 0"
+                               size="small"
+                               @click="refundBtn(scope.row,scope.$index)">退款
+                    </el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                :page-sizes="[15, 20, 25, 30]"
+                :page-size="pageSize"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="totalNumber">
+        </el-pagination>
+        <template>
+            <el-dialog id="examineDialog" title="审核" :visible.sync="examineDialog" width="30%"
+                       :before-close="clearForm('examineForm')">
+                <el-form :inline="true" label-width="150px" :model="examineForm" ref="examineForm" status-icon>
+                    <!--:rules="examineFormRules"-->
+                    <el-form-item label="线下审核状态"><!--prop="loanStatus"-->
+                        <el-select v-model="examineForm.loanStatus">
+                            <el-option v-for="(item,index) in status" :key="index" :label="item.label"
+                                       :value="item.value"></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="首付比例" v-show="examineForm.loanStatus === 5"><!--prop="downPaymentRate"-->
+                        <input class="inline-input" maxlength="4" v-model="examineForm.downPaymentRate" type="number"
+                               min="0" max="1">
+                    </el-form-item>
+                    <el-form-item style="width: 98%;text-align: right">
+                        <el-button @click="closeExamineDialog">取消</el-button>
+                        <el-button type="primary" @click="confirmationAudit">确定</el-button>
+                        <!--confirmationAudit('examineForm')-->
+                    </el-form-item>
+                </el-form>
+            </el-dialog>
+            <el-dialog id="payForDialog" title="上传尾款发票" :visible.sync="payForDialog" width="30%">
+                <div>
+                    <el-upload
+                            class="upload-demo"
+                            :action="uploadUrl"
+                            :multiple="false"
+                            :show-file-list="false"
+                            :before-upload="beforeAvatarUpload"
+                            :on-success="uploadSuccess"
+                            :on-error="uploadFailed">
+                        <el-button size="small" type="primary" style="display: block">点击上传</el-button>
+                        <div slot="tip" class="el-upload__tip">上传一张格式为jpg/png图片,且不超过2M</div>
+                        <!--缓存图片查看-->
+                        <img v-if="imgUrl" :src="imgUrl" alt="" style="width: 50%">
+                    </el-upload>
+                    <div style="width: 100%;text-align: right;padding: 5px 10px;margin-top: 10px">
+                        <el-button size="mini" @click="closePayForDialog">取消</el-button>
+                        <el-button v-if="imgUrl" size="mini" type="warning" @click="payForAddImg(imgUrl)">确认支付
+                        </el-button>
+                    </div>
+                </div>
+            </el-dialog>
+            <el-dialog id="vehicleDeliveryDialog" title="上传交车照片" :visible.sync="vehicleDeliveryDialog" width="30%">
+                <div>
+                    <el-upload
+                            class="upload-demo"
+                            :action="uploadUrl"
+                            list-type="picture"
+                            :file-list="fileList"
+                            :before-upload="beforeAvatarUpload"
+                            :on-success="uploadSuccessOther"
+                            :on-remove="handleRemove"
+                            :on-error="uploadFailed">
+                        <el-button size="small" type="primary" style="display: block">点击上传</el-button>
+                        <div slot="tip" class="el-upload__tip">上传一张格式为jpg/png图片,且不超过2M</div>
+                    </el-upload>
+                    <!--缓存图片查看-->
+                    <div>
+
+                    </div>
+                    <div style="width: 100%;text-align: right;padding: 5px 10px;margin-top: 10px">
+                        <el-button size="mini" @click="closeVehicleDeliveryDialog">取消</el-button>
+                        <el-button size="mini" type="warning" @click="confirmVehicleDelivery">确认交车</el-button>
+                    </div>
+                </div>
+            </el-dialog>
+            <el-dialog id="carInfoDialog" title="车型信息" :visible.sync="carInfoDialog" width="30%">
+                <ul>
+                    <li><span>车型名称:</span>{{carInfo.name}}</li>
+                    <li><span>车型描述:</span>{{carInfo.carDesc}}</li>
+                    <li><span>价格:</span>{{carInfo.price}}</li>
+                    <li><span>座椅描述:</span>{{carInfo.seatDesc}}</li>
+                    <li><span>订金:</span>{{carInfo.deposit}}</li>
+                    <li><span>首付比例:</span>{{carInfo.downPaymentRate}}</li>
+                    <li><span>订金是否小于首付:</span>{{carInfo.depositLessthanDownPayment == true? '小于':'大于'}}</li>
+                    <li><span>删除:</span>{{carInfo.delFlag==0?'未删除':'已删除'}}</li>
+                    <li><span>车型图片:</span><img :src="carInfo.url" alt="车型图片" style="width: 20%;display: inline-block">
+                    </li>
+                    <!--<li><span>移动版车型图片</span><img :src="carInfo.mobileUrl" alt="车型图片" style="width: 20%;display: inline-block"></li>-->
+                </ul>
+            </el-dialog>
+            <el-dialog id="matchingDialog" title="选配信息" :visible.sync="matchingDialog" width='80%'>
+                <ul>
+                    <li v-if="matchingInfo.carCaliper">
+                        <h4>卡钳</h4>
+                        <p>
+                            <span>名称: </span><i>{{matchingInfo.carCaliper.name}}</i>
+                            <span>价格: </span><i>{{matchingInfo.carCaliper.price}}</i>
+                            <span>类型: </span><i>{{matchingInfo.carCaliper.type}}</i>
+                            <span>选值: </span><i>{{matchingInfo.carCaliper.value}}</i>
+                        </p>
+                    </li>
+                    <li v-if="matchingInfo.carColor">
+                        <h4>车身颜色</h4>
+                        <p>
+                            <span>名称: </span><i>{{matchingInfo.carColor.name}}</i>
+                            <span>价格: </span><i>{{matchingInfo.carColor.price}}</i>
+                            <span>类型: </span><i>{{matchingInfo.carColor.type}}</i>
+                            <span>选值: </span><i>{{matchingInfo.carColor.value}}</i>
+                        </p>
+                    </li>
+                    <li v-if="matchingInfo.carSeat">
+                        <h4>座椅</h4>
+                        <p>
+                            <span>名称: </span><i>{{matchingInfo.carSeat.name}}</i>
+                            <span>价格: </span><i>{{matchingInfo.carSeat.price}}</i>
+                            <span>类型: </span><i>{{matchingInfo.carSeat.type}}</i>
+                            <span>选值: </span><i>{{matchingInfo.carSeat.value}}</i>
+                        </p>
+                    </li>
+                    <li v-if="matchingInfo.carWheelHub">
+                        <h4>轮廓</h4>
+                        <p>
+                            <span>名称: </span><i>{{matchingInfo.carWheelHub.name}}</i>
+                            <span>价格: </span><i>{{matchingInfo.carWheelHub.price}}</i>
+                            <span>类型: </span><i>{{matchingInfo.carWheelHub.type}}</i>
+                            <span>选值: </span><i>{{matchingInfo.carWheelHub.value}}</i>
+                        </p>
+                    </li>
+                    <li v-if="matchingInfo.catUpholstery">
+                        <h4>内饰</h4>
+                        <p>
+                            <span>名称: </span><i>{{matchingInfo.catUpholstery.name}}</i>
+                            <span>价格: </span><i>{{matchingInfo.catUpholstery.price}}</i>
+                            <span>类型: </span><i>{{matchingInfo.catUpholstery.type}}</i>
+                            <span>选值: </span><i>{{matchingInfo.catUpholstery.value}}</i>
+                        </p>
+                    </li>
+                </ul>
+            </el-dialog>
+            <el-dialog id="refundDialog" title="退款" :visible.sync="refundDialog" width="32%"
+                       :before-close="clearForm('refundForm')">
+                <el-form label-width="100px" :model="refundForm" ref="refundForm" status-icon>
+                    <el-row>
+                        <el-col :span="12">
+                            <el-form-item label="购车人姓名">
+                                <el-input v-model="refundForm.name" disabled></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                            <el-form-item label="购车人手机号" prop="orderCode">
+                                <el-input v-model="refundForm.mobile" disabled></el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                            <el-form-item label="订单号" prop="orderCode">
+                                <el-input v-model="refundForm.orderCode" disabled></el-input>
+                            </el-form-item>
+                        </el-col>
+
+                        <el-col :span="12">
+                            <el-form-item label="退订原因">
+                                <el-select v-model="refundForm.reason">
+                                    <el-option v-for="(item,index) in reasons"
+                                               :key="index"
+                                               :label="item.label"
+                                               :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="14" style="text-align: right">
+                            <el-button @click="refundDialog = false">取消</el-button>
+                            <el-button type="primary" @click="saveRefundInfo('refundForm')">确认</el-button>
+                        </el-col>
+                    </el-row>
+                </el-form>
+            </el-dialog>
+
+
+            <el-dialog id="refundDeaDialog" title="退款详情" :visible.sync="refundDeaDialog" min-width="600px">
+                <el-form label-width="100px" :model="refundDealtis" ref="refundForm" status-icon
+                >
+                    <el-row>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="会员号">
+                                {{refundDealtis.customerId}}
+                                <!--<el-input v-model="refundDealtis.customerId" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="退单号" prop="backCode">
+                                {{refundDealtis.backCode}}
+
+                                <!--<el-input v-model="refundDealtis.backCode" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="退订金额" prop="backPrice">
+                                {{refundDealtis.backPrice}}
+
+                                <!--<el-input v-model="refundDealtis.backPrice" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="收款人户名" prop="name">
+                                {{refundDealtis.name}}
+
+                                <!--<el-input v-model="refundDealtis.name" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="银行账号" prop="account">
+                                {{refundDealtis.account}}
+
+                                <!--<el-input v-model="refundDealtis.account" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="银行名称" prop="bank">
+                                {{refundDealtis.bank}}
+
+                                <!--<el-input v-model="refundDealtis.bank" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="审核时间" prop="bank">
+                                {{refundDealtis.auditTime}}
+
+                                <!--<el-input v-model="refundDealtis.auditTime" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="审核人" prop="bank">
+                                {{refundDealtis.auditor}}
+
+                                <!--<el-input v-model="refundDealtis.auditor" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="退订时间" prop="bank">
+                                {{refundDealtis.finishTime}}
+
+                                <!--<el-input v-model="refundDealtis.finishTime" disabled></el-input>-->
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="退款原因" prop="bank">
+                                <!--<span></span><i>{{refundDealtis.dealerReason}}</i>-->
+                                <el-select v-model="refundDealtis.dealerReason" disabled>
+                                    <el-option v-for="(item,index) in dealerReason"
+                                               :key="index"
+                                               :label="item.label"
+                                               :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="退订原因">
+                                <el-select v-model="refundDealtis.reason" disabled>
+                                    <el-option v-for="(item,index) in reasons"
+                                               :key="index"
+                                               :label="item.label"
+                                               :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12" width="210px">
+                            <el-form-item label="退单状态">
+                                <el-select v-model="refundDealtis.status" disabled>
+                                    <el-option v-for="(item,index) in refundStatus"
+                                               :key="index"
+                                               :label="item.label"
+                                               :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="24" style="text-align: right">
+                            <el-button @click="refundDeaDialog = false">关闭</el-button>
+                        </el-col>
+                    </el-row>
+                </el-form>
+            </el-dialog>
+
+            <el-dialog :visible.sync="dialogVisibleList">
+					<span v-for="(item,index) in images" :key='index'>
+						<img width="50%" :src="images[index]" alt="">
+					</span>
+            </el-dialog>
+
+        </template>
+    </div>
+</template>
+
+<script>
+    import {utils} from "../utils/config";
+    import * as Api from "../utils/server"
+    import {Message} from "element-ui"
+
+    export default {
+        name: "",
+        data() {
+            return {
+                dialogVisibleList: false,
+                refundDeaDialog: false, //退款详情
+                examineDialog: false,  // 审核对话框
+                carInfoDialog: false,  // 车型信息对话框
+                payForDialog: false,  // 支付对话框
+                vehicleDeliveryDialog: false,  // 交车对话框
+                matchingDialog: false,  // 车辆选配对话框
+                refundDialog: false, // 退款对话框
+                carInfo: {}, // 车辆信息
+                matchingInfo: {}, // 选配信息
+                tableData: [],
+                queryData: {
+                    orderNumber: '', //搜索条件 订单号
+                    mobile: '',//搜索条件 手机号
+                    name: '',//搜索条件 购车人姓名
+                    name: '',//搜索条件 购车人姓名
+                    status: '',//搜索条件 订单状态
+                    offlinePayType: '',//搜索条件 首付/尾款支付状态
+                },
+                loading: true,
+                totalNumber: null,
+                totalPage: null,
+                currentPage: 1,
+                pageSize: 15,
+                images: '',
+                examineForm: {
+                    loanStatus: '',  // 状态
+                    downPaymentRate: ''  // 比例
+                },
+                examineFormRules: {
+                    loanStatus: [
+                        {required: true, message: '请选择审核状态', trigger: 'change'}
+                    ],
+                    downPaymentRate: [
+                        {validator: this.$validator.downPaymentRate, trigger: 'blur'}
+                    ]
+                },
+                status: [
+                    {
+                        label: '线下审核通过',
+                        value: 5
+                    },
+                    {
+                        label: '线下审核不通过',
+                        value: 6
+                    }
+                ],
+                payStatusData: [
+                    {
+                        label: '未支付',
+                        value: 3
+                    },
+                    {
+                        label: '线下已支付',
+                        value: 1
+                    },
+                    {
+                        label: '线上已支付',
+                        value: 2
+                    }
+                ],
+                orderStatus: [
+                    {
+                        label: '退定金完成',
+                        value: 5
+                    }
+                ],
+                index: null, // 当前列表Id
+                uploadUrl: Api.imgUrl,
+                imgUrl: '',
+                fileList: [],
+                imgUrls: [],
+                refundForm: {
+                    customerId: '',       // 会员id
+                    backCode: '',         // 退单号
+                    backPrice: '',        // 退订金额
+                    name: '',             // 收款人姓名
+                    account: '',          // 收款人银行账号
+                    bank: '',             // 银行名称
+                    reason: '',           // 退订原因
+                    status: '',         // 退单状态
+                    orderId: '',         //订单主键
+                    orderCode: '',          //订单code
+                    backPrice: '',           //价格
+                    name: '',     //  退货人姓名
+                    mobile: '',  //   退货人手机号
+                },
+                refundDealtis: {},
+                // refundFormRules: {
+                //     backCode: [
+                //         {required: true, message: '请输入退单号', trigger: 'blur'}
+                //     ],
+                //     backPrice: [
+                //         {validator: this.$validator.backPrice, trigger: 'blur'}
+                //     ],
+                //     name: [
+                //         {validator: this.$validator.name, trigger: 'blur'}
+                //     ],
+                //     account: [
+                //         {validator: this.$validator.account, trigger: 'blur'}
+                //     ],
+                //     bank: [
+                //         {required: true, message: '请输入银行名称', trigger: 'blur'}
+                //     ],
+                // },
+                dealerReason: [
+                    {
+                        label: '72小时内',
+                        value: "1"
+                    },
+                    {
+                        label: '线上审核失败',
+                        value: "2"
+                    },
+                    {
+                        label: '线下审核失败',
+                        value: "3"
+                    },
+                    {
+                        label: '72小时后-线下审核前',
+                        value: "4"
+                    },
+                    {
+                        label: '线下审核后',
+                        value: "5"
+                    },
+                    {
+                        label: '72小时后',
+                        value: "46"
+                    }
+
+                ],
+                reasons: [
+                    {
+                        label: '贷款审核不通过',
+                        value: "1"
+                    },
+                    {
+                        label: '车辆选配内容错误',
+                        value: "2"
+                    },
+                    {
+                        label: '地址信息填写错误',
+                        value: "3"
+                    },
+                    {
+                        label: '其他',
+                        value: "4"
+                    }
+                ],
+                refundStatus: [
+                    {
+                        label: '待审核',
+                        value: "1"
+                    },
+                    {
+                        label: '审核通过',
+                        value: "2"
+                    },
+                    {
+                        label: '审核不通过',
+                        value: "3"
+                    },
+                    {
+                        label: '已退款',
+                        value: "4"
+                    }
+                ],
+                refundState: '',
+            };
+        },
+        computed: {
+            autoHeight() {
+                return window.innerHeight - 277
+            }
+        },
+        mounted() {
+            this.getRows();
+        },
+        destroyed() {
+            sessionStorage.removeItem('imgUrl');
+            sessionStorage.removeItem('imgUrls');
+        },
+        methods: {
+            // 审核按钮
+            examine(row, index) {
+                this.examineDialog = true;
+                this.index = row.id;
+            },
+            // 支付按钮
+            payForBtn(row, index) {
+                let src = sessionStorage.getItem('imgUrl');
+                if (src) {
+                    this.imgUrl = src
+                } else {
+                    this.imgUrl = '';
+                }
+                this.payForDialog = true;
+                this.index = row.id;
+            },
+            // 交车按钮
+            deliveryVehicles(row, index) {
+                let urls = sessionStorage.getItem('imgUrls');
+                if (urls) {
+                    urls.forEach((item, index) => {
+                        this.imgUrls.push(item.response.data[0]);
+                    });
+                    this.fileList = urls;
+                } else {
+                    this.fileList = [];
+                    this.imgUrls = [];
+                }
+                this.vehicleDeliveryDialog = true;
+                this.index = row.id;
+            },
+            // 退款按钮
+            refundBtn(row, index) {
+                this.refundForm.customerId = row.customerId;
+                this.refundForm.orderId = row.id;
+                this.refundForm.orderCode = row.code;
+                this.refundForm.backPrice = row.depositPrice;
+                this.refundForm.name = row.name;
+                this.refundForm.mobile = row.mobile;
+
+                let params = {
+                    customerId: row.customerId,
+                    orderId: row.id
+                };
+                // 查询是否满足退款条件
+                this.$post("/business/CarOrder/returnorder", params)
+                    .then(res => {
+                        if (res.status === 200) {
+                            if (res.data.success) {
+                                this.refundState = res.data.data;
+                                // Message.success(res.data.data);
+                                this.refundDialog = true;
+                            } else {
+                                Message.error(res.data.error);
+                            }
+                        }
+                    })
+                    .catch(err => {
+                        console.log(err)
+                    })
+            },
+            refreshTable() {
+                this.queryData = {}
+                this.getRows();
+            },
+            // 获取订单列表信息
+            getRows() {
+                let data = {
+                    payType: 1,
+                    code: this.queryData.orderNumber,
+                    name: this.queryData.name,
+                    mobile: this.queryData.mobile,
+                    status: this.queryData.status,
+                    currentPage: this.currentPage,
+                    pageNumber: this.pageSize
+                };
+                let params = utils.paramData(data);
+                this.$get("business/CarOrder/backPage", data).then(
+                    response => {
+                        if (response.status == 200) {
+                            this.loading = false;
+                            this.tableData = response.data.data.pp;
+                            this.totalNumber = response.data.data.page.totalNumber;
+                            this.$message.success("数据加载成功");
+                        } else {
+                            this.$message.success("服务器连接异常");
+                        }
+                    },
+                    response => {
+                        this.$message.success("服务器连接异常");
+                    }
+                );
+            },
+            // 查看车型信息
+            queryCarInfo(info, index) {
+                this.carInfoDialog = true;
+                this.carInfo = Object.assign({}, JSON.parse(info));
+            },
+
+            // 查看选配信息
+            queryMatchingInfo(info, index) {
+                this.matchingDialog = true;
+                let jsInfo = JSON.parse(info);
+                this.matchingInfo = jsInfo;
+            },
+            //首付款线下支付状态
+            OfflinePay(data) {
+                //判断有没有线下支付信息 如果没有有就根据订单状态判断
+                if (data.offlinePayments == undefined) {
+                    if (data.status == 3) {
+                        return '线上已支付';
+                    }
+                } else {
+                    return data.offlinePayments.downPaymentStatus == 0 ? '未支付' : '线下已支付';
+                }
+                return "未支付";
+            },
+            // 单款状态
+            loanState(data) {
+                var data = data;
+                var val = data.loanStatus;
+                if (data.payType == 1) {
+                    val = 0;
+                }
+                let str = "";
+                switch (+val) {
+                    case 0:
+                        str = "暂无";
+                        break;
+                    case 1:
+                        str = "线上待审核";
+                        break;
+                    case 2:
+                        str = "线上审核通过";
+                        break;
+                    case 3:
+                        str = "线上审核不通过";
+                        break;
+                    case 4:
+                        str = "线下待审核";
+                        break;
+                    case 5:
+                        str = "线下审核通过";
+                        break;
+                    case 6:
+                        str = "线下审核不通过";
+                        break;
+                    default:
+                        str = "暂无";
+                }
+                return str;
+            },
+            // 改变当前页面条数
+            handleSizeChange(val) {
+                console.log(`每页 ${val} 条`);
+                this.currentPage = 1;
+                this.pageSize = val;
+                this.loading = true;
+                this.getRows();
+            },
+            // 改变当前页
+            handleCurrentChange(val) {
+                console.log(`当前页: ${val}`);
+                this.currentPage = val;
+                this.loading = true;
+                this.getRows();
+            },
+            // 关闭审核对话框
+            closeExamineDialog() {
+                this.examineDialog = false;
+            },
+            // 对话框关闭 清空对话框form表单
+            clearForm(formName) {
+                this.resetForm(formName);
+            },
+            // 确认审核结果
+            confirmationAudit(formName) {
+                // this.$refs[formName].validate((valid) => {
+                //   if (valid) {
+                let params = {
+                    id: this.index,
+                    loanStatus: this.examineForm.loanStatus,
+                    downPaymentRate: this.examineForm.downPaymentRate
+                };
+                this.$put("/business/CarOrder/offlineReview", params)
+                    .then(res => {
+                        if (res.status === 200) {
+                            console.log(res.data)
+                            if (res.data.success) {
+                                Message.success(res.data.data);
+                            } else {
+                                Message.error(res.data.error);
+                            }
+                        } else {
+                            Message.error(res.data.error)
+                        }
+                        this.examineDialog = false;
+                        this.loading = true;
+                        this.getRows();
+                    });
+                //   }
+                // })
+            },
+            // 上传前的回调函数
+            beforeAvatarUpload(file) {
+                const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+                const isLt2M = file.size / 1024 / 1024 < 2;
+
+                if (!isJPG) {
+                    this.$message.error('请上传JPG / PNG 格式图片!');
+                }
+                if (!isLt2M) {
+                    this.$message.error('上传头像图片大小不能超过 2MB!');
+                }
+                return isJPG && isLt2M;
+            },
+            // 图片上传成功
+            uploadSuccess(response, file, fileList) {
+                if (response.success) {
+                    this.imgUrl = response.data[0];
+                    // 图片上传成功缓存下当前图片url
+                    sessionStorage.setItem('imgUrl', this.imgUrl);
+                } else {
+                    console.log(response.data);
+                }
+            },
+            // 上传多图
+            uploadSuccessOther(response, file, fileList) {
+                if (fileList.length > 0) {
+                    fileList.forEach((item, index) => {
+                        this.imgUrls.push(item.response.data[0]);
+                    });
+                    sessionStorage.setItem('imgUrls', fileList);
+                }
+            },
+            // 图片列表删除
+            handleRemove(file, fileList) {
+                console.log('图片列表删除');
+                console.log(file, fileList);
+            },
+            // 上传失败
+            uploadFailed(err, file, fileList) {
+                console.log('上传失败');
+                console.log(err);
+            },
+            // 最终支付(id imgUrl)添加图片
+            payForAddImg(url) {
+                let params = {
+                    id: this.index,
+                    invoicePath: url
+                };
+                this.$put("/business/CarOrder/pay", params)
+                    .then(res => {
+                        if (res.status === 200) {
+                            if (res.data.success) {
+                                Message.success(res.data.data);
+                            } else {
+                                Message.warning(res.data.error);
+                            }
+                            sessionStorage.removeItem('imgUrl');
+                            this.payForDialog = false;
+                            this.examineDialog = false;
+                            this.loading = true;
+                            setTimeout(() => {
+                                this.getRows();
+                            }, 1000)
+                        }
+                    })
+            },
+            // 关闭支付对话框
+            closePayForDialog() {
+                this.payForDialog = false;
+            },
+            // 确认交车
+            confirmVehicleDelivery() {
+                let params = {
+                    id: this.index,
+                    invoicePath: this.imgUrls
+                };
+                this.$put("/business/CarOrder/delivery", params)
+                    .then(res => {
+                        if (res.status === 200) {
+                            if (res.data.success) {
+                                Message.success(res.data.data);
+                            } else {
+                                Message.warning(res.data.error);
+                            }
+                            sessionStorage.removeItem('imgUrls');
+                            this.vehicleDeliveryDialog = false;
+                            this.loading = true;
+                            setTimeout(() => {
+                                this.getRows();
+                            }, 1000)
+                        }
+                    })
+            },
+            // 关闭交车对话框
+            closeVehicleDeliveryDialog() {
+                this.vehicleDeliveryDialog = false;
+            },
+            // 保存退单信息
+            saveRefundInfo(formName) {
+                if (this.refundForm.reason == "") {
+                    Message.success("请选择退订原因")
+                    return;
+                }
+                this.$refs[formName].validate((valid) => {
+                    if (valid) {
+                        let params = {
+                            customerId: this.refundForm.customerId,
+                            backCode: this.refundForm.backCode,
+                            backPrice: this.refundForm.backPrice,
+                            name: this.refundForm.name,
+                            account: this.refundForm.account,
+                            bank: this.refundForm.bank,
+                            reason: this.refundForm.reason,
+                            status: this.refundForm.status,
+                            dealerReason: this.refundState,
+                            orderId: this.refundForm.orderId,
+                            orderCode: this.refundForm.orderCode,
+                            backPrice: this.refundForm.backPrice
+
+                        };
+                        this.$post("/business/CarBackOrder/save", params)
+                            .then(res => {
+                                if (res.status === 200) {
+                                    if (res.data.success) {
+                                        Message.success("提交成功");
+                                    } else {
+                                        Message.warning("提交失败");
+                                    }
+                                    this.resetForm('refundForm');
+                                    setTimeout(() => {
+                                        this.refundDialog = false;
+                                        this.loading = true;
+                                        this.getRows();
+                                    }, 1000)
+                                }
+                            })
+                            .catch(err => {
+                            })
+                    }
+                })
+            },
+            // 表单重置
+            resetForm(formName) {
+                if (this.$refs[formName] !== undefined) {
+                    this.$refs[formName].resetFields();
+                }
+            },
+            Detailsofrefund(id, refundStatus) {
+                if (refundStatus == 0) {
+                    return;
+                }
+                let params = {
+                    orderId: id,
+                };
+                this.$get("/business/CarBackOrder/getOne", params)
+                    .then(res => {
+                        if (res.status === 200) {
+                            if (res.data.success) {
+                                this.refundDealtis = res.data.data;
+
+                                this.refundDeaDialog = true;
+                                // Message.success(res.data.data);
+                            } else {
+                                Message.warning(res.data.error);
+                            }
+
+                        }
+                    })
+
+            },
+            open: function (file) {
+                console.log(file)
+                this.dialogImageUrl = file;
+                this.images = this.dialogImageUrl.split(",");
+                console.log(this.images);
+                this.dialogVisibleList = true;
+            },
+
+
+        },
+    };
+</script>
+
+<style scoped lang="less">
+    input[type=number] {
+        -moz-appearance: textfield;
+    }
+
+    input[type=number]::-webkit-inner-spin-button,
+    input[type=number]::-webkit-outer-spin-button {
+        -webkit-appearance: none;
+        margin: 0;
+    }
+
+    #carInfoDialog {
+        ul {
+            padding: 5px;
+
+            li {
+                display: flex;
+                align-items: center;
+                overflow: hidden;
+                padding: 5px;
+
+                span {
+                    display: inline-block;
+                    width: 150px;
+                    font-size: 15px;
+                    font-weight: bold;
+                }
+            }
+        }
+    }
+
+    #matchingDialog {
+        ul {
+            padding: 5px;
+
+            li {
+                margin-top: 10px;
+                padding: 10px;
+                box-shadow: 0 0 10px #ccc;
+
+                h4 {
+                    font-size: 16px;
+                }
+
+                p {
+                    margin-top: 10px;
+
+                    span {
+                        display: inline-block;
+                        font-size: 15px;
+                        text-align: right;
+
+                        &:first-child {
+                            margin-left: 20px;
+                        }
+                    }
+
+                    i {
+                        margin-left: 10px;
+                        font-style: normal;
+                        font-size: 14px;
+                        display: inline-block;
+                        min-width: 120px;
+                    }
+                }
+            }
+        }
+    }
+
+    #examineDialog {
+        .el-form--inline .el-form-item {
+            width: 100%;
+            margin-right: 0;
+
+            .inline-input {
+                -webkit-appearance: none;
+                background-color: #fff;
+                background-image: none;
+                border-radius: 4px;
+                border: 1px solid #dcdfe6;
+                -webkit-box-sizing: border-box;
+                box-sizing: border-box;
+                color: #606266;
+                display: inline-block;
+                font-size: inherit;
+                height: 40px;
+                line-height: 40px;
+                outline: none;
+                padding: 0 15px;
+                -webkit-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
+                -o-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
+                transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
+                width: 217px;
+            }
+
+            .inline-span {
+                display: inline-block;
+                margin-left: 10px;
+                font-size: 16px;
+                color: #f15353;
+            }
+        }
+
+    }
+
+    .link {
+        text-decoration: none;
+
+        &:link {
+            border: none;
+            color: #5eb3e6;
+        }
+
+        &:focus {
+            outline-style: none;
+            outline-width: 0;
+        }
+    }
+</style>

+ 10 - 1
src/router/index.js

@@ -14,7 +14,8 @@ import login from '@/components/login'
 import fullPay from '@/components/fullPay'
 //贷款订单
 import loanPay from '@/components/loanPay'
-
+//退订订单
+import unsubscribe from '@/components/unsubscribe'
 
 Vue.use(Router)
 Vue.use(ElementUI)
@@ -41,6 +42,14 @@ const router = new Router({
                     requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
                 },
                 component: loanPay
+            },
+            {
+                path: 'unsubscribe',
+                name: 'unsubscribe',
+                meta: {
+                    requireAuth: true, // 添加该字段,表示进入这个路由是需要登录的
+                },
+                component: unsubscribe
             }
         ]
     },