809 lines
36 KiB
Vue
809 lines
36 KiB
Vue
|
|
<template>
|
|||
|
|
<div class="app-container">
|
|||
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
|||
|
|
<el-form-item label="日期">
|
|||
|
|
<el-date-picker
|
|||
|
|
v-model="dateRange"
|
|||
|
|
type="daterange"
|
|||
|
|
align="right"
|
|||
|
|
unlink-panels
|
|||
|
|
range-separator="至"
|
|||
|
|
start-placeholder="开始日期"
|
|||
|
|
end-placeholder="结束日期"
|
|||
|
|
format="yyyy-MM-dd" style="width: 220px"
|
|||
|
|
:picker-options="pickerOptions" >
|
|||
|
|
</el-date-picker>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="关键字">
|
|||
|
|
<el-input v-model="queryParams.custSearchInfo" placeholder="请输入用户姓名,编号,手机号" maxlength="20" clearable style="width: 220px"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="订单号">
|
|||
|
|
<el-input v-model="queryParams.orderId" placeholder="请输入订单号" maxlength="20" clearable style="width: 220px"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
|
|||
|
|
<el-form-item label="交易号">
|
|||
|
|
<el-input v-model="queryParams.tradeNo" placeholder="请输入交易号" maxlength="20" clearable style="width: 220px"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="餐次">
|
|||
|
|
<el-select v-model="queryParams.mealtimeTypeList" multiple style="width: 220px" clearable>
|
|||
|
|
<el-option label="早餐" value="1"></el-option>
|
|||
|
|
<el-option label="午餐" value="2"></el-option>
|
|||
|
|
<el-option label="下午茶" value="3"></el-option>
|
|||
|
|
<el-option label="晚餐" value="4"></el-option>
|
|||
|
|
<el-option label="夜宵" value="5"></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="设备订单号">
|
|||
|
|
<el-input v-model="queryParams.macOrderId" placeholder="请输入交易号" maxlength="20" clearable style="width: 220px"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="设备名称">
|
|||
|
|
<el-input v-model="queryParams.deviceSearchInfo" placeholder="请输入交易号" maxlength="20" clearable style="width: 220px"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
|
|||
|
|
<el-form-item label="所属区域" prop="areaIdList">
|
|||
|
|
<el-cascader v-model="queryParams.areaIdList"
|
|||
|
|
:options="treeAreaOptions" :filterable="true" style="width: 220px" :show-all-levels="false"
|
|||
|
|
:props="{
|
|||
|
|
multiple: true,
|
|||
|
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
|||
|
|
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
|||
|
|
value:'id',label:'treeName'
|
|||
|
|
}" clearable @change="handleAreaChange">
|
|||
|
|
</el-cascader>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="所属食堂" prop="canteenIdList">
|
|||
|
|
<el-select v-model="queryParams.canteenIdList" multiple placeholder="请选择所属食堂" style="width: 220px" @change="handleCanteenChange">
|
|||
|
|
<el-option v-for="item in canteenOptions"
|
|||
|
|
:key="item.canteenId"
|
|||
|
|
:label="item.canteenName"
|
|||
|
|
:value="item.canteenId"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="所属档口" prop="stallIdList">
|
|||
|
|
<el-select v-model="queryParams.stallIdList" multiple placeholder="请选择所属档口" style="width: 220px" >
|
|||
|
|
<el-option v-for="item in stallOptions"
|
|||
|
|
:key="item.stallId"
|
|||
|
|
:label="item.stallName"
|
|||
|
|
:value="item.stallId"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="订单状态">
|
|||
|
|
<el-select v-model="queryParams.orderStateMixList" multiple style="width: 220px" clearable>
|
|||
|
|
<el-option v-for="item in orderStateOptions"
|
|||
|
|
:key="item.key"
|
|||
|
|
:label="item.value"
|
|||
|
|
:value="item.key"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="支付方式">
|
|||
|
|
<el-select v-model="queryParams.payTypeList" multiple style="width: 220px" clearable>
|
|||
|
|
<el-option v-for="item in orderPayOptions"
|
|||
|
|
:key="item.key"
|
|||
|
|
:label="item.value"
|
|||
|
|
:value="item.key"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="核身方式">
|
|||
|
|
<el-select v-model="queryParams.nuClearMode" style="width: 220px" clearable>
|
|||
|
|
<el-option v-for="item in nuclearModeOptions"
|
|||
|
|
:key="item.key"
|
|||
|
|
:label="item.value"
|
|||
|
|
:value="item.key"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="用户类别">
|
|||
|
|
<el-select v-model="queryParams.psnType" style="width: 220px" clearable>
|
|||
|
|
<el-option v-for="item in psnTypeOptions"
|
|||
|
|
:key="item.id"
|
|||
|
|
:label="item.psnTypeName"
|
|||
|
|
:value="item.psnType"
|
|||
|
|
></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="使用餐券">
|
|||
|
|
<el-select v-model="queryParams.ifCoupon" style="width: 220px" clearable>
|
|||
|
|
<el-option label="是" value="1"></el-option>
|
|||
|
|
<el-option label="否" value="2"></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="是否在线">
|
|||
|
|
<el-select v-model="queryParams.ifOnline" style="width: 220px" clearable>
|
|||
|
|
<el-option label="是" value="1"></el-option>
|
|||
|
|
<el-option label="否" value="2"></el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="菜品名称">
|
|||
|
|
<el-input v-model="queryParams.goodsSearchInfo" placeholder="请输入菜品名称" maxlength="20" clearable style="width: 220px"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="流水号">
|
|||
|
|
<el-input v-model="queryParams.mealCode" placeholder="请输入流水号" maxlength="20" clearable style="width: 220px"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<!-- <el-form-item label="所属区域" prop="orgIdList">
|
|||
|
|
<el-cascader v-model="queryParams.orgIdList"
|
|||
|
|
:options="treeOrgOptions" :filterable="true" style="width: 220px" :show-all-levels="false"
|
|||
|
|
:props="{
|
|||
|
|
multiple: true,
|
|||
|
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
|||
|
|
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
|||
|
|
value:'id',label:'text'
|
|||
|
|
}" clearable>
|
|||
|
|
</el-cascader>
|
|||
|
|
</el-form-item> -->
|
|||
|
|
|
|||
|
|
|
|||
|
|
<el-form-item>
|
|||
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|||
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-form>
|
|||
|
|
|
|||
|
|
<el-row :gutter="10" class="mb8">
|
|||
|
|
<!-- <el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="primary"
|
|||
|
|
plain
|
|||
|
|
icon="el-icon-plus"
|
|||
|
|
size="mini"
|
|||
|
|
@click="handleAdd"
|
|||
|
|
>新增</el-button>
|
|||
|
|
</el-col> -->
|
|||
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|||
|
|
</el-row>
|
|||
|
|
|
|||
|
|
<el-table v-loading="loading" :data="tableListData" height="800">
|
|||
|
|
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{(queryParams.pageNum - 1) * 10 + scope.$index + 1}}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="就餐日期" align="center" prop="orderDate" :show-overflow-tooltip="true" width="100"/>
|
|||
|
|
<el-table-column label="流水号" align="center" prop="mealCode" :show-overflow-tooltip="true" width="80"/>
|
|||
|
|
<el-table-column label="餐次" align="center" prop="mealtimeName" :show-overflow-tooltip="true" width="80"/>
|
|||
|
|
<el-table-column label="菜品明细" align="center" prop="orderDetailList" :show-overflow-tooltip="true" width="120">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span v-for="item in scope.row.orderDetailList" :key="item.detailId">{{ item.goodsDishesName }}*{{ item.goodsGetNum }};</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="订单金额" align="center" prop="payableAmount" :show-overflow-tooltip="true" width="80">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.payableAmount/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="餐券名称" align="center" prop="couponName" :show-overflow-tooltip="true" width="80"/>
|
|||
|
|
<el-table-column label="餐券支付金额" align="center" prop="couponAmount" :show-overflow-tooltip="true" width="80">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.couponAmount/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="实付金额" align="center" prop="realAmount" :show-overflow-tooltip="true" width="80">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.realAmount/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" width="80"/>
|
|||
|
|
<el-table-column label="订餐员" align="center" prop="" :show-overflow-tooltip="true" width="100"/>
|
|||
|
|
<el-table-column label="用户编号" align="center" prop="custNum" :show-overflow-tooltip="true" width="120"/>
|
|||
|
|
<el-table-column label="用户姓名" align="center" prop="custName" :show-overflow-tooltip="true" width="100"/>
|
|||
|
|
<el-table-column label="用户手机号" align="center" prop="mobile" :show-overflow-tooltip="true" width="120"/>
|
|||
|
|
<el-table-column label="所属组织" align="center" prop="orgFullName" :show-overflow-tooltip="true" width="120"/>
|
|||
|
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
|
|||
|
|
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="120"/>
|
|||
|
|
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="120"/>
|
|||
|
|
<el-table-column label="用户类别" align="center" prop="psnTypeName" :show-overflow-tooltip="true" width="100"/>
|
|||
|
|
<el-table-column label="订单号" align="center" prop="orderId" :show-overflow-tooltip="true" width="180"/>
|
|||
|
|
<el-table-column label="设备订单号" align="center" prop="macOrderId" :show-overflow-tooltip="true" width="180"/>
|
|||
|
|
<el-table-column label="下单时间" align="center" prop="orderTime" :show-overflow-tooltip="true" width="180"/>
|
|||
|
|
<el-table-column label="订单来源" align="center" prop="" :show-overflow-tooltip="true" width="100"/>
|
|||
|
|
<el-table-column label="设备名称" align="center" prop="deviceName" :show-overflow-tooltip="true" width="150"/>
|
|||
|
|
<el-table-column label="订单状态" align="center" prop="orderStateMix" :show-overflow-tooltip="true" width="100">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span v-for="item in orderStateOptions" :key="item.key" v-if="item.key==scope.row.orderStateMix">
|
|||
|
|
{{ item.value }}
|
|||
|
|
</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
@click="handleView(scope.row)"
|
|||
|
|
>详情</el-button>
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text" v-if="scope.row.orderStateMix==11"
|
|||
|
|
@click="handleRefundPart(scope.row)"
|
|||
|
|
>部分退款</el-button>
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text" v-if="scope.row.orderStateMix==11"
|
|||
|
|
@click="handleRefund(scope.row)"
|
|||
|
|
>退单</el-button>
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text" v-if="scope.row.orderStateMix==11"
|
|||
|
|
@click="writeOffOrder(scope.row)"
|
|||
|
|
>核销</el-button>
|
|||
|
|
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
|
|||
|
|
<pagination
|
|||
|
|
v-show="total>0"
|
|||
|
|
:total="total"
|
|||
|
|
:page.sync="queryParams.pageNum"
|
|||
|
|
:limit.sync="queryParams.pageSize"
|
|||
|
|
@pagination="getList"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<!-- 详情对话框 -->
|
|||
|
|
<el-dialog title="详情" :visible.sync="open" width="1000px" append-to-body>
|
|||
|
|
<div style="width: 100%;height: 600px;overflow-y: auto;">
|
|||
|
|
<el-descriptions class="margin-top" title="订单信息" :column="3" size="small" border>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">订单号</template>
|
|||
|
|
{{orderInfoData.orderId}}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">设备订单号</template>
|
|||
|
|
{{ orderInfoData.macOrderId }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">订单来源</template>
|
|||
|
|
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">订餐员</template>
|
|||
|
|
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">设备编号</template>
|
|||
|
|
{{ orderInfoData.machineNum }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">设备名称</template>
|
|||
|
|
{{ orderInfoData.deviceName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">设备型号</template>
|
|||
|
|
{{ orderInfoData.deviceModel }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label">设备SN</template>
|
|||
|
|
{{ orderInfoData.machineSn }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 所属区域</template>
|
|||
|
|
{{ orderInfoData.areaName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 所属食堂</template>
|
|||
|
|
{{ orderInfoData.canteenName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 所属档口</template>
|
|||
|
|
{{ orderInfoData.stallName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 用户姓名</template>
|
|||
|
|
{{ orderInfoData.custName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 用户编号</template>
|
|||
|
|
{{ orderInfoData.custNum }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 用户手机号</template>
|
|||
|
|
{{ orderInfoData.mobile }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 所属组织</template>
|
|||
|
|
{{ orderInfoData.orgFullName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 用户类别</template>
|
|||
|
|
{{ orderInfoData.psnTypeName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 就餐日期</template>
|
|||
|
|
{{ orderInfoData.orderDate }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 餐次</template>
|
|||
|
|
{{ orderInfoData.mealtimeName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 餐桌名称</template>
|
|||
|
|
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 订单金额</template>
|
|||
|
|
{{ (orderInfoData.payableAmount/100).toFixed(2) }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 餐券名称</template>
|
|||
|
|
{{ orderInfoData.couponName }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 餐券支付金额</template>
|
|||
|
|
{{ (orderInfoData.couponAmount/100).toFixed(2) }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 实付金额</template>
|
|||
|
|
{{ (orderInfoData.realAmount/100).toFixed(2) }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 核身方式</template>
|
|||
|
|
<div v-for="item in nuclearModeOptions" :key="item.key" v-if="item.key==orderInfoData.nuClearMode">
|
|||
|
|
{{ item.value }}
|
|||
|
|
</div>
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 支付方式</template>
|
|||
|
|
{{orderInfoData.payTypesStr}}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 下单时间</template>
|
|||
|
|
{{ orderInfoData.orderTime }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 支付时间</template>
|
|||
|
|
{{ orderInfoData.payTime }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 订单状态</template>
|
|||
|
|
<div v-for="item in orderStateOptions" :key="item.key" v-if="item.key==orderInfoData.orderStateMix">
|
|||
|
|
{{ item.value }}
|
|||
|
|
</div>
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 流水号</template>
|
|||
|
|
{{ orderInfoData.mealCode }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 备注</template>
|
|||
|
|
{{ orderInfoData.remark }}
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 人脸照片</template>
|
|||
|
|
无
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
<el-descriptions-item>
|
|||
|
|
<template slot="label"> 菜品图片</template>
|
|||
|
|
无
|
|||
|
|
</el-descriptions-item>
|
|||
|
|
</el-descriptions>
|
|||
|
|
<div style="margin: 10px 0;font-weight: bold;font-size: 16px;color: #000;">菜品信息</div>
|
|||
|
|
<el-table :data="orderInfoData.orderDetailList">
|
|||
|
|
<el-table-column label="菜品名称" align="center" prop="goodsDishesName" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="单价(元)" align="center" prop="prefPrice" :show-overflow-tooltip="true">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.prefPrice/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="数量" align="center" prop="quantity" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="合计(元)" align="center" prop="totalAmount" :show-overflow-tooltip="true">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.totalAmount/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="退款数量" align="center" prop="goodsRefundNum" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="退款金额(元)" align="center" prop="refundAmount" :show-overflow-tooltip="true">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.refundAmount/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
<div style="margin: 10px 0;font-weight: bold;font-size: 16px;color: #000;">优惠明细</div>
|
|||
|
|
<el-table :data="orderInfoData.discountList">
|
|||
|
|
<el-table-column label="优惠项名称" align="center" prop="" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="变动类型" align="center" prop="" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="优惠/上浮金额" align="center" prop="" :show-overflow-tooltip="true"/>
|
|||
|
|
</el-table>
|
|||
|
|
</div>
|
|||
|
|
<div slot="footer" class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="open=false">确 定</el-button>
|
|||
|
|
<el-button @click="open=false">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
</el-dialog>
|
|||
|
|
|
|||
|
|
|
|||
|
|
<!-- 部分退款对话框 -->
|
|||
|
|
<el-dialog title="部分退款" :visible.sync="openPart" width="80%" append-to-body>
|
|||
|
|
<el-row>
|
|||
|
|
<el-col :span="2">退款方式:</el-col>
|
|||
|
|
<el-col :span="22">
|
|||
|
|
<el-radio-group v-model="refundType" @change="choseRefundTypeRadio">
|
|||
|
|
<el-radio label="1" style="font-size: 14px;margin-bottom: 10px;">按数量退款</el-radio>
|
|||
|
|
<el-radio label="2" style="font-size: 14px;margin-bottom: 10px;">按金额退款</el-radio>
|
|||
|
|
</el-radio-group>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
|
|||
|
|
<el-table :data="orderDetailList" @selection-change="handleSelectionChange" v-if="refundType==1">
|
|||
|
|
<el-table-column type="selection" width="50" align="center"/>
|
|||
|
|
<el-table-column label="菜品名称" align="center" prop="goodsDishesName" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="菜品价格" align="center" prop="prefPrice" :show-overflow-tooltip="true">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.prefPrice/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="菜品数量" align="center" prop="quantity" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="菜品金额" align="center" prop="totalAmount" :show-overflow-tooltip="true">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.totalAmount/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="可退款数量" align="center" prop="quantity" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="已退款数量" align="center" prop="goodsRefundNum" :show-overflow-tooltip="true"/>
|
|||
|
|
<el-table-column label="退款金额" align="center" prop="refundAmount" :show-overflow-tooltip="true">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.refundAmount/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
|
|||
|
|
<el-table-column label="退款数量" align="center" prop="refundNum" :show-overflow-tooltip="true" width="100">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<el-input v-model="scope.row.refundNum" placeholder="退款数量" maxlength="20" clearable style="width: 100%" @change="inputNum(scope.row)" @input="(v)=>(scope.row.refundNum=v.replace(/[^\d]/g,''))"/>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column label="退款金额" align="center" prop="refundMoney" :show-overflow-tooltip="true" width="100">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<span>{{ (scope.row.refundMoney/100).toFixed(2) }}</span>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
<div v-if="refundType==2">
|
|||
|
|
<el-form :model="rowData" ref="rowData" :rules="refundRules" size="small" label-width="120px">
|
|||
|
|
<el-form-item label="订单金额:">
|
|||
|
|
<span>{{ (rowData.payableAmount/100).toFixed(2) }}</span>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="实付金额:">
|
|||
|
|
<span>{{ (rowData.realAmount/100).toFixed(2) }}</span>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="可退金额:">
|
|||
|
|
<span>{{ (rowData.payableAmount/100).toFixed(2) }}</span>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="已退金额:">
|
|||
|
|
<span>{{ (rowData.refundAmount/100).toFixed(2) }}</span>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="本次退款金额:" prop="refundMoney">
|
|||
|
|
<el-input v-model="rowData.refundMoney" placeholder="请输入本次退款金额" maxlength="20" clearable @input="(v)=>(rowData.refundMoney=v.replace(/[^\d.]/g,''))" style="width: 200px;"/>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-form>
|
|||
|
|
</div>
|
|||
|
|
<div slot="footer" class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="confirmRefund">确 定</el-button>
|
|||
|
|
<el-button @click="openPart=false">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
</el-dialog>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,orderNuclearModeListApi,custOrgTreeApi} from "@/api/order/offline";
|
|||
|
|
import { orderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi } from "@/api/order/offline";
|
|||
|
|
|
|||
|
|
export default {
|
|||
|
|
name: "",
|
|||
|
|
dicts: [],
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
// 遮罩层
|
|||
|
|
loading: true,
|
|||
|
|
// 选中数组
|
|||
|
|
ids: [],
|
|||
|
|
// 非单个禁用
|
|||
|
|
single: true,
|
|||
|
|
// 非多个禁用
|
|||
|
|
multiple: true,
|
|||
|
|
// 显示搜索条件
|
|||
|
|
showSearch: true,
|
|||
|
|
// 总条数
|
|||
|
|
total: 0,
|
|||
|
|
//表格数据
|
|||
|
|
tableListData: [],
|
|||
|
|
// 是否显示弹出层
|
|||
|
|
open: false,
|
|||
|
|
dateRange:[new Date(),new Date()],
|
|||
|
|
pickerOptions: {
|
|||
|
|
shortcuts: [{
|
|||
|
|
text: '最近一周',
|
|||
|
|
onClick(picker) {
|
|||
|
|
const start = new Date();
|
|||
|
|
const end = new Date();
|
|||
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
|
|||
|
|
picker.$emit('pick', [start, end]);
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
text: '最近一个月',
|
|||
|
|
onClick(picker) {
|
|||
|
|
const start = new Date();
|
|||
|
|
const end = new Date();
|
|||
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|||
|
|
picker.$emit('pick', [start, end]);
|
|||
|
|
}
|
|||
|
|
},{
|
|||
|
|
text: '最近三个月',
|
|||
|
|
onClick(picker) {
|
|||
|
|
const start = new Date();
|
|||
|
|
const end = new Date();
|
|||
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
|
|||
|
|
picker.$emit('pick', [start, end]);
|
|||
|
|
}
|
|||
|
|
}]
|
|||
|
|
},
|
|||
|
|
treeAreaOptions:[],//区域树
|
|||
|
|
canteenOptions:[],//查询-食堂下拉选
|
|||
|
|
stallOptions:[],//查询-档口下拉选
|
|||
|
|
orderStateOptions:[],
|
|||
|
|
orderPayOptions:[],
|
|||
|
|
nuclearModeOptions:[],
|
|||
|
|
psnTypeOptions:[],
|
|||
|
|
treeOrgOptions:[],
|
|||
|
|
// 查询参数
|
|||
|
|
queryParams: {
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 10,
|
|||
|
|
custSearchInfo: undefined,
|
|||
|
|
orderId: undefined,
|
|||
|
|
tradeNo: undefined,
|
|||
|
|
macOrderId: undefined,
|
|||
|
|
deviceSearchInfo: undefined,
|
|||
|
|
areaIdList:[],
|
|||
|
|
canteenIdList:[],
|
|||
|
|
stallIdList:[],
|
|||
|
|
orderStateMixList:[],
|
|||
|
|
payTypeList:[],
|
|||
|
|
nuClearMode: undefined,
|
|||
|
|
psnType: undefined,
|
|||
|
|
ifCoupon: undefined,
|
|||
|
|
ifOnline: undefined,
|
|||
|
|
goodsSearchInfo: undefined,
|
|||
|
|
mealCode: undefined,
|
|||
|
|
},
|
|||
|
|
//订单详情
|
|||
|
|
orderInfoData: {},
|
|||
|
|
openPart:false,
|
|||
|
|
orderDetailList:[],
|
|||
|
|
refundType:'1',
|
|||
|
|
refundList:[],
|
|||
|
|
rowData:{},
|
|||
|
|
refundRules:{
|
|||
|
|
refundMoney: [
|
|||
|
|
{
|
|||
|
|
required: true,
|
|||
|
|
message: "本次退款金额不能为空",
|
|||
|
|
trigger: "blur",
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
},
|
|||
|
|
created() {
|
|||
|
|
this.getAreaTreeData();
|
|||
|
|
this.orderStateList();
|
|||
|
|
this.orderPayAllType();
|
|||
|
|
this.orderNuclearModeList();
|
|||
|
|
this.queryPsnTypeByPage();
|
|||
|
|
// this.getOrgTreeData();//组织树-暂无接口
|
|||
|
|
this.getList()
|
|||
|
|
},
|
|||
|
|
methods: {
|
|||
|
|
//区域树
|
|||
|
|
getAreaTreeData() {
|
|||
|
|
systemAreaTreeApi({}).then((response) => {
|
|||
|
|
this.treeAreaOptions = response;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
handleAreaChange(e){
|
|||
|
|
console.log(this.queryParams.areaIdList)
|
|||
|
|
let param= {
|
|||
|
|
areaIdList:this.queryParams.areaIdList
|
|||
|
|
}
|
|||
|
|
getCanteenByAreaApi(param).then((response) => {
|
|||
|
|
this.canteenOptions=response||[]
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
handleCanteenChange(e){
|
|||
|
|
console.log(this.queryParams.canteenIdList)
|
|||
|
|
let param= {
|
|||
|
|
canteenIdList:this.queryParams.canteenIdList
|
|||
|
|
}
|
|||
|
|
getStallByCanteenApi(param).then((response) => {
|
|||
|
|
this.stallOptions=response||[]
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
//订单状态
|
|||
|
|
orderStateList(){
|
|||
|
|
orderStateListApi({}).then(response => {
|
|||
|
|
this.orderStateOptions = response.data
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
//支付方式
|
|||
|
|
orderPayAllType(){
|
|||
|
|
orderPayAllTypeApi().then(response => {
|
|||
|
|
this.orderPayOptions = response.data
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
//核身方式
|
|||
|
|
orderNuclearModeList(){
|
|||
|
|
orderNuclearModeListApi().then(response => {
|
|||
|
|
this.nuclearModeOptions = response.data
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
//用户类型
|
|||
|
|
queryPsnTypeByPage(){
|
|||
|
|
queryPsnTypeByPageApi().then(response => {
|
|||
|
|
this.psnTypeOptions = response.rows
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
//组织树-暂无接口
|
|||
|
|
getOrgTreeData() {
|
|||
|
|
custOrgTreeApi({}).then((response) => {
|
|||
|
|
this.treeOrgOptions = response;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
/** 搜索按钮操作 */
|
|||
|
|
handleQuery() {
|
|||
|
|
this.queryParams.pageNum = 1;
|
|||
|
|
this.getList();
|
|||
|
|
},
|
|||
|
|
/** 重置按钮操作 */
|
|||
|
|
resetQuery() {
|
|||
|
|
this.resetForm("queryForm");
|
|||
|
|
this.handleQuery();
|
|||
|
|
},
|
|||
|
|
/** 查询列表 */
|
|||
|
|
getList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
let param = {
|
|||
|
|
...this.queryParams,
|
|||
|
|
"current": this.queryParams.pageNum,
|
|||
|
|
"size": this.queryParams.pageSize,
|
|||
|
|
"orderTypeList":[11,13,21,22],
|
|||
|
|
"startDate":this.formatDate(this.dateRange[0]),
|
|||
|
|
"endDate":this.formatDate(this.dateRange[1])
|
|||
|
|
}
|
|||
|
|
orderPageListApi(param).then(response => {
|
|||
|
|
this.tableListData = response.data.records;
|
|||
|
|
this.total = Number(response.data.total);
|
|||
|
|
this.loading = false;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 修改按钮操作 */
|
|||
|
|
handleView(row) {
|
|||
|
|
let param = {
|
|||
|
|
orderId:row.orderId
|
|||
|
|
}
|
|||
|
|
orderDetailInfoApi(param).then(response => {
|
|||
|
|
this.orderInfoData = response.data
|
|||
|
|
});
|
|||
|
|
this.open = true;
|
|||
|
|
},
|
|||
|
|
/** 部分退款按钮操作 */
|
|||
|
|
handleRefundPart(row) {
|
|||
|
|
this.orderDetailList = row.orderDetailList;
|
|||
|
|
this.rowData = row;
|
|||
|
|
this.$set(this.rowData,"refundMoney","")
|
|||
|
|
console.log(this.rowData)
|
|||
|
|
this.orderDetailList.forEach((item,index)=>{
|
|||
|
|
this.$set(this.orderDetailList[index],"refundNum",item.quantity)
|
|||
|
|
this.$set(this.orderDetailList[index],"refundMoney",(item.prefPrice).toFixed(2))
|
|||
|
|
})
|
|||
|
|
this.refundList=[]
|
|||
|
|
this.openPart = true;
|
|||
|
|
},
|
|||
|
|
inputNum(row){
|
|||
|
|
if(Number(row.refundNum)>row.quantity){
|
|||
|
|
this.$modal.msgError("退款数量不能大于可退款数量!");
|
|||
|
|
row.refundNum=row.quantity
|
|||
|
|
}
|
|||
|
|
row.refundMoney = Number(row.refundNum)*(row.prefPrice).toFixed(2)
|
|||
|
|
},
|
|||
|
|
choseRefundTypeRadio(e){
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
handleSelectionChange(selection){
|
|||
|
|
console.log(selection)
|
|||
|
|
this.refundList = selection.map((item) => {
|
|||
|
|
let obj = {'detailId':item.detailId,'quantity':item.refundNum}
|
|||
|
|
return obj
|
|||
|
|
})
|
|||
|
|
},
|
|||
|
|
confirmRefund(){
|
|||
|
|
if(this.refundType==1){
|
|||
|
|
if(this.refundList.length==0){
|
|||
|
|
this.$modal.msgError("请先勾选退款菜品!");
|
|||
|
|
}else{
|
|||
|
|
console.log(this.refundList)
|
|||
|
|
let param = {
|
|||
|
|
detailRefundList:this.refundList,
|
|||
|
|
orderId:this.rowData.orderId
|
|||
|
|
}
|
|||
|
|
refundOrderPartApi(param).then(response => {
|
|||
|
|
if(response.data.resultCode==10000){
|
|||
|
|
this.$modal.msgSuccess("退款成功");
|
|||
|
|
}
|
|||
|
|
this.getList()
|
|||
|
|
this.openPart = false;
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if(this.refundType==2){
|
|||
|
|
this.$refs["rowData"].validate(valid => {
|
|||
|
|
if (valid) {
|
|||
|
|
let param = {
|
|||
|
|
refundAmount:Number(this.rowData.refundMoney),
|
|||
|
|
orderId:this.rowData.orderId
|
|||
|
|
}
|
|||
|
|
refundOrderPartApi(param).then(response => {
|
|||
|
|
if(response.data.resultCode==10000){
|
|||
|
|
this.$modal.msgSuccess("退款成功");
|
|||
|
|
}
|
|||
|
|
this.getList()
|
|||
|
|
this.openPart = false;
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
/** 退单按钮操作 */
|
|||
|
|
handleRefund(row) {
|
|||
|
|
let param = {
|
|||
|
|
backType: 1,
|
|||
|
|
macOrderId:row.macOrderId,
|
|||
|
|
orderId:row.orderId
|
|||
|
|
}
|
|||
|
|
this.$modal.confirm('是否确认退单?').then(function() {
|
|||
|
|
return refundOrderApi(param);
|
|||
|
|
}).then(() => {
|
|||
|
|
this.getList();
|
|||
|
|
this.$modal.msgSuccess("退单成功");
|
|||
|
|
}).catch(() => {});
|
|||
|
|
},
|
|||
|
|
/** 核销按钮操作 */
|
|||
|
|
writeOffOrder(row) {
|
|||
|
|
let param = {
|
|||
|
|
orderId:row.orderId
|
|||
|
|
}
|
|||
|
|
this.$modal.confirm('是否确认核销?').then(function() {
|
|||
|
|
return writeOffOrderApi(param);
|
|||
|
|
}).then(() => {
|
|||
|
|
this.getList();
|
|||
|
|
this.$modal.msgSuccess("核销成功");
|
|||
|
|
}).catch(() => {});
|
|||
|
|
},
|
|||
|
|
//日期
|
|||
|
|
formatDate(date) {
|
|||
|
|
// 格式化为 YYYY-MM-DD
|
|||
|
|
const year = date.getFullYear();
|
|||
|
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
|||
|
|
const day = String(date.getDate()).padStart(2, '0');
|
|||
|
|
return `${year}-${month}-${day}`;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
</script>
|
|||
|
|
|