基本配置修改 优化
This commit is contained in:
parent
b4b0fbbe21
commit
cfc37c65ff
|
|
@ -30,15 +30,15 @@
|
|||
<el-option label="下午茶" value="3"></el-option>
|
||||
<el-option label="晚餐" value="4"></el-option>
|
||||
<el-option label="夜宵" value="5"></el-option>
|
||||
</el-select>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="areaId">
|
||||
<el-cascader v-model="queryParams.areaId"
|
||||
:options="treeAreaOptions" :filterable="true" style="width: 220px" :show-all-levels="false"
|
||||
:props="{
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
value:'id',label:'label'
|
||||
}" clearable collapse-tags @change="handleAreaChange">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
:label="item.canteenName"
|
||||
:value="item.canteenId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属档口" prop="stallId">
|
||||
<el-select v-model="queryParams.stallId" clearable collapse-tags placeholder="请选择所属档口" style="width: 220px" >
|
||||
|
|
@ -58,50 +58,50 @@
|
|||
:label="item.stallName"
|
||||
:value="item.stallId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态">
|
||||
<el-select v-model="queryParams.orderStateList" clearable multiple collapse-tags style="width: 220px">
|
||||
<el-select v-model="queryParams.orderStateList" clearable multiple collapse-tags style="width: 220px">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sm_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="Number(dict.value)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="支付方式">
|
||||
<el-select v-model="queryParams.payStateList" clearable multiple collapse-tags style="width: 220px">
|
||||
<el-select v-model="queryParams.payStateList" clearable multiple collapse-tags style="width: 220px">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sm_order_pay_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="Number(dict.value)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="用户类别">
|
||||
<el-select v-model="queryParams.psnType" style="width: 220px" clearable>
|
||||
<el-select v-model="queryParams.psnType" style="width: 220px" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="Number(dict.value)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="所属组织" prop="deptIdList">
|
||||
<el-form-item label="所属组织" prop="deptIdList">
|
||||
<el-cascader v-model="queryParams.deptIdList"
|
||||
:options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
||||
:props="{
|
||||
:props="{
|
||||
multiple: true,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
value:'id',label:'label'
|
||||
}" clearable collapse-tags >
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
|
@ -111,24 +111,24 @@
|
|||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini" :disabled="multiple"
|
||||
@click="handleBatchWriteOff"
|
||||
>批量核销</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
type="primary"
|
||||
size="mini" :disabled="multiple"
|
||||
@click="handleBatchRefund"
|
||||
>批量退单</el-button>
|
||||
</el-col>
|
||||
<!--
|
||||
|
||||
</el-col>
|
||||
<!--
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
type="primary"
|
||||
size="mini" :disabled="multiple"
|
||||
@click="handleSyncPayState"
|
||||
>同步订单状态</el-button>
|
||||
|
|
@ -145,16 +145,27 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="订单类型" align="center" prop="orderType" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sm_order_type" :value="scope.row.orderType"/>
|
||||
<dict-tag :options="dict.type.sm_order_type" :value="scope.row.orderType"/>
|
||||
</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="orderDate" :show-overflow-tooltip="true" width="100"/>
|
||||
<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.goodsName }}*{{ item.quantity }};</span>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<!-- 如果是数组(List<OrderDetail>) -->
|
||||
<span v-if="Array.isArray(scope.row.orderDetailList)">
|
||||
<span v-for="item in scope.row.orderDetailList" :key="item.detailId">
|
||||
{{ item.goodsName }}*{{ item.quantity }};
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<!-- 如果是字符串(yrorder_details) -->
|
||||
<span v-else>
|
||||
{{ scope.row.orderDetailList }}
|
||||
</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>
|
||||
|
|
@ -167,10 +178,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="支付方式" align="center" prop="payType" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sm_order_pay_type" :value="scope.row.payType"/>
|
||||
<dict-tag :options="dict.type.sm_order_pay_type" :value="scope.row.payType"/>
|
||||
</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="remark" :show-overflow-tooltip="true" width="80"/>
|
||||
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true" width="120"/>
|
||||
|
|
@ -179,8 +190,8 @@
|
|||
<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="" :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="orderTime" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderId" :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="orderState" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<!-- <dict-tag :options="dict.type.sm_order_status" :value="scope.row.orderState"/> -->
|
||||
|
|
@ -189,36 +200,36 @@
|
|||
<span v-if="scope.row.orderState==3&&scope.row.payState==3">已退单</span>
|
||||
<span v-if="scope.row.orderState==3&&scope.row.payState==4">已取消</span>
|
||||
<span v-if="scope.row.orderState==4">待下单</span>
|
||||
<span v-if="scope.row.orderState==5">部分退单</span>
|
||||
<span v-if="scope.row.orderState==5">部分退单</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">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text" v-if="scope.row.orderState==1||scope.row.orderState==2||scope.row.orderState==5"
|
||||
@click="handleRefundPart(scope.row)"
|
||||
@click="handleRefundPart(scope.row)"
|
||||
>部分退款</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
size="mini"
|
||||
type="text" v-if="scope.row.orderState==1||scope.row.orderState==2||scope.row.orderState==4"
|
||||
@click="handleRefund(scope.row)"
|
||||
@click="handleRefund(scope.row)"
|
||||
>退单</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
size="mini"
|
||||
type="text" v-if="scope.row.orderState==1"
|
||||
@click="writeOffOrder(scope.row)"
|
||||
@click="writeOffOrder(scope.row)"
|
||||
>核销</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
size="mini"
|
||||
type="text" v-if="scope.row.commentState==1"
|
||||
@click="checkEvaluate(scope.row)"
|
||||
>评价</el-button>
|
||||
@click="checkEvaluate(scope.row)"
|
||||
>评价</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -234,15 +245,15 @@
|
|||
<!-- 详情对话框 -->
|
||||
<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 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>
|
||||
<dict-tag :options="dict.type.sm_order_type" :value="orderInfoData.orderType"/>
|
||||
</el-descriptions-item>
|
||||
<template slot="label">订单类型</template>
|
||||
<dict-tag :options="dict.type.sm_order_type" :value="orderInfoData.orderType"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"> 所属区域</template>
|
||||
{{ orderInfoData.areaName }}
|
||||
|
|
@ -289,11 +300,11 @@
|
|||
<template slot="label"> 餐次</template>
|
||||
{{ orderInfoData.mealtimeName }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label"> 订单金额</template>
|
||||
<template slot="label"> 订单金额</template>
|
||||
{{ (orderInfoData.payableAmount/100).toFixed(2) }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"> 实付金额</template>
|
||||
{{ ((orderInfoData.payableAmount-orderInfoData.refundAmount)/100).toFixed(2) }}
|
||||
|
|
@ -313,8 +324,8 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"> 支付方式</template>
|
||||
<dict-tag :options="dict.type.sm_order_pay_type" :value="orderInfoData.payType"/>
|
||||
</el-descriptions-item>
|
||||
<dict-tag :options="dict.type.sm_order_pay_type" :value="orderInfoData.payType"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"> 下单时间</template>
|
||||
{{ orderInfoData.orderTime }}
|
||||
|
|
@ -325,19 +336,19 @@
|
|||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label"> 订单状态</template>
|
||||
<template slot="label"> 订单状态</template>
|
||||
<span v-if="orderInfoData.orderState==1">已下单</span>
|
||||
<span v-if="orderInfoData.orderState==2">已完成</span>
|
||||
<span v-if="orderInfoData.orderState==3&&orderInfoData.payState==3">已退单</span>
|
||||
<span v-if="orderInfoData.orderState==3&&orderInfoData.payState==4">已取消</span>
|
||||
<span v-if="orderInfoData.orderState==4">待下单</span>
|
||||
<span v-if="orderInfoData.orderState==5">部分退单</span>
|
||||
<span v-if="orderInfoData.orderState==5">部分退单</span>
|
||||
<!-- <dict-tag :options="dict.type.sm_order_status" :value="orderInfoData.orderState"/> -->
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"> 备注</template>
|
||||
{{ orderInfoData.remark }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="margin: 10px 0;font-weight: bold;font-size: 16px;color: #000;">菜品信息</div>
|
||||
<el-table :data="orderInfoData.orderDetailList">
|
||||
|
|
@ -345,26 +356,26 @@
|
|||
<el-table-column label="单价(元)" align="center" prop="salePrice" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.salePrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款数量" align="center" prop="refundNum" :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>
|
||||
</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-column label="优惠/上浮金额" align="center" prop="" :show-overflow-tooltip="true"/>
|
||||
</el-table> -->
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
@ -392,33 +403,33 @@
|
|||
<el-table-column label="菜品单价" align="center" prop="salePrice" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.salePrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="可退款数量" align="center" prop="unRefundNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="已退款数量" align="center" prop="refundNum" :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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="退款数量" align="center" prop="goRefundNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.goRefundNum" placeholder="退款数量" maxlength="20" clearable style="width: 100%" @change="inputNum(scope.row)" @input="(v)=>(scope.row.goRefundNum=v.replace(/[^\d]/g,''))"/>
|
||||
</template>
|
||||
<el-input v-model="scope.row.goRefundNum" placeholder="退款数量" maxlength="20" clearable style="width: 100%" @change="inputNum(scope.row)" @input="(v)=>(scope.row.goRefundNum=v.replace(/[^\d]/g,''))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款金额" align="center" prop="refundMoney" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.refundMoney/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-table>
|
||||
<div v-if="refundType==2">
|
||||
<el-form :model="rowData" ref="rowData" :rules="refundRules" size="small" label-width="120px">
|
||||
<el-form-item label="订单金额:">
|
||||
|
|
@ -437,7 +448,7 @@
|
|||
<el-input v-model="rowData.refundMoney" placeholder="请输入本次退款金额" maxlength="20" clearable @input="(v)=>(rowData.refundMoney=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmRefund">确 定</el-button>
|
||||
<el-button @click="openPart=false">取 消</el-button>
|
||||
|
|
@ -448,12 +459,12 @@
|
|||
<div style="width: 100%;height: auto;padding-left: 30px;margin-bottom: 20px;">
|
||||
<div style="margin-bottom: 10px;"><span style="font-weight: 600;">用户姓名:</span>{{evaluateData.createBy}}</div>
|
||||
<div style="margin-bottom: 10px;"><span style="font-weight: 600;">评价内容:</span>{{evaluateData.description}}</div>
|
||||
<div style="margin-bottom: 10px;"><span style="font-weight: 600;" v-if="evaluateData.pictureList&&evaluateData.pictureList.length>0">评价图片:</span></div>
|
||||
<div style="margin-bottom: 10px;"><span style="font-weight: 600;" v-if="evaluateData.pictureList&&evaluateData.pictureList.length>0">评价图片:</span></div>
|
||||
<div style="margin-bottom: 10px;width: 96%;padding: 5px;display: flex;flex-wrap: wrap;" v-if="evaluateData.pictureList&&evaluateData.pictureList.length>0">
|
||||
<div v-for="(item,index) in evaluateData.pictureList" :key="index">
|
||||
<img :src="item" style="width: 80px;height: 80px;" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px;"><span style="font-weight: 600;">评价时间:</span>{{evaluateData.createTime}}</div>
|
||||
<div style="margin-bottom: 10px;"><span style="font-weight: 600;">菜品评分:</span></div>
|
||||
</div>
|
||||
|
|
@ -465,7 +476,7 @@
|
|||
<div style="width: 65%;">
|
||||
<el-rate v-model="item.starLevel" size="large" disabled text-color="#ff9900"></el-rate>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="openEva=false">确 定</el-button>
|
||||
|
|
@ -491,7 +502,7 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||
import { orderPageListApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi,getEvaluaOrderDetailApi } from "@/api/order/reserve";
|
||||
|
|
@ -514,9 +525,9 @@ export default {
|
|||
// 总条数
|
||||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
tableListData: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open: false,
|
||||
dateRange:[new Date(),new Date()],
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
|
|
@ -553,20 +564,20 @@ export default {
|
|||
// orderPayOptions:[],
|
||||
// deliveryTypeOptions:[],
|
||||
// orderTypeOptions:[],
|
||||
deptOptions:[], //组织树
|
||||
deptOptions:[], //组织树
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
custSearchInfo: undefined,//关键字
|
||||
orderId: undefined, //订单号
|
||||
orderId: undefined, //订单号
|
||||
goodsSearchInfo: undefined, //菜品名称
|
||||
mealtimeTypeList:[],//餐次
|
||||
areaId:null,//区域-单选
|
||||
canteenId:null,//食堂-单选
|
||||
stallId:null,//档口-单选
|
||||
orderStateList:[],//订单状态
|
||||
payStateList:[], //支付方式
|
||||
payStateList:[], //支付方式
|
||||
deptIdList:[], //所属组织
|
||||
},
|
||||
//订单详情
|
||||
|
|
@ -592,25 +603,25 @@ export default {
|
|||
//批量核销批量退单提醒对话框
|
||||
handleType:"退单",
|
||||
ableList:[],
|
||||
unableList:[],
|
||||
unableList:[],
|
||||
openRemind:false,
|
||||
openEva:false,
|
||||
evaluateData:{}
|
||||
evaluateData:{}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getAreaTreeData();
|
||||
this.getDeptTree();
|
||||
created() {
|
||||
this.getAreaTreeData();
|
||||
this.getDeptTree();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
//区域树
|
||||
getAreaTreeData() {
|
||||
systemAreaTreeApi({}).then((response) => {
|
||||
this.treeAreaOptions = response.data;
|
||||
this.treeAreaOptions = response.data;
|
||||
});
|
||||
},
|
||||
handleAreaChange(e){
|
||||
handleAreaChange(e){
|
||||
let param= {
|
||||
areaId:this.queryParams.areaId,"canteenType": 1
|
||||
}
|
||||
|
|
@ -621,7 +632,7 @@ export default {
|
|||
this.queryParams.stallId=null
|
||||
});
|
||||
},
|
||||
handleCanteenChange(e){
|
||||
handleCanteenChange(e){
|
||||
let param= {
|
||||
canteenId:this.queryParams.canteenId
|
||||
}
|
||||
|
|
@ -630,7 +641,7 @@ export default {
|
|||
this.queryParams.stallId=null
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
|
|
@ -647,7 +658,7 @@ export default {
|
|||
})
|
||||
.filter((node) => node.status !== '1')
|
||||
},
|
||||
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -660,14 +671,14 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
custSearchInfo: undefined,//关键字
|
||||
orderId: undefined, //订单号
|
||||
orderId: undefined, //订单号
|
||||
goodsSearchInfo: undefined, //菜品名称
|
||||
mealtimeTypeList:[],//餐次
|
||||
areaId:null,//区域-单选
|
||||
canteenId:null,//食堂-单选
|
||||
stallId:null,//档口-单选
|
||||
orderStateList:[],//订单状态
|
||||
payStateList:[], //支付方式
|
||||
payStateList:[], //支付方式
|
||||
deptIdList:[], //所属组织
|
||||
}
|
||||
this.resetForm("queryForm");
|
||||
|
|
@ -675,8 +686,8 @@ export default {
|
|||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let param = {
|
||||
this.loading = true;
|
||||
let param = {
|
||||
...this.queryParams,
|
||||
"orderTypeList":[2],
|
||||
}
|
||||
|
|
@ -699,29 +710,29 @@ export default {
|
|||
if(item.phoneNumber&&item.phoneNumber!=""){
|
||||
this.$set(item,"phoneNumber",decryptWithSM4(item.phoneNumber))
|
||||
}
|
||||
})
|
||||
})
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleView(row) {
|
||||
this.orderInfoData = Object.assign({}, row)
|
||||
this.open = true;
|
||||
this.orderInfoData = Object.assign({}, row)
|
||||
this.open = true;
|
||||
},
|
||||
/** 部分退款按钮操作 */
|
||||
handleRefundPart(row) {
|
||||
this.orderDetailList = row.orderDetailList;
|
||||
this.rowData = row;
|
||||
this.$set(this.rowData,"refundMoney","")
|
||||
this.$set(this.rowData,"refundMoney","")
|
||||
console.log(this.rowData)
|
||||
this.orderDetailList.forEach((item,index)=>{
|
||||
this.$set(this.orderDetailList[index],"unRefundNum",item.quantity-item.refundNum)
|
||||
this.$set(this.orderDetailList[index],"goRefundNum",item.unRefundNum)
|
||||
this.$set(this.orderDetailList[index],"refundMoney",Number(item.goRefundNum)*(item.salePrice).toFixed(2))
|
||||
})
|
||||
this.refundList=[]
|
||||
this.openPart = true;
|
||||
this.refundList=[]
|
||||
this.openPart = true;
|
||||
this.$refs.multiplePartTable.clearSelection()
|
||||
},
|
||||
inputNum(row){
|
||||
|
|
@ -734,7 +745,7 @@ export default {
|
|||
if(item.detailId==row.detailId){
|
||||
this.$set(item,"quantity",row.goRefundNum)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
//数量退款/金额退款
|
||||
choseRefundTypeRadio(e){},
|
||||
|
|
@ -744,7 +755,7 @@ export default {
|
|||
this.refundList = selection.map((item) => {
|
||||
let obj = {'detailId':item.detailId,'quantity':item.goRefundNum}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
selectable(row){
|
||||
return row.unRefundNum>0
|
||||
|
|
@ -765,10 +776,10 @@ export default {
|
|||
this.$modal.msgSuccess("退款成功");
|
||||
}
|
||||
this.getList()
|
||||
this.openPart = false;
|
||||
this.openPart = false;
|
||||
}).catch(err => {
|
||||
this.refundList = []
|
||||
this.$refs.multiplePartTable.clearSelection()
|
||||
this.$refs.multiplePartTable.clearSelection()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -784,13 +795,13 @@ export default {
|
|||
this.$modal.msgSuccess("退款成功");
|
||||
}
|
||||
this.getList()
|
||||
this.openPart = false;
|
||||
});
|
||||
this.openPart = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
|
@ -810,7 +821,7 @@ export default {
|
|||
},
|
||||
/** 核销按钮操作 */
|
||||
writeOffOrder(row) {
|
||||
let param = {
|
||||
let param = {
|
||||
orderIdList:[row.orderId]
|
||||
}
|
||||
this.$modal.confirm('是否确认核销?').then(function() {
|
||||
|
|
@ -825,24 +836,24 @@ export default {
|
|||
this.evaluateData = {}
|
||||
getEvaluaOrderDetailApi(row.orderId).then(response => {
|
||||
console.log(response)
|
||||
this.evaluateData = response.data
|
||||
this.evaluateData = response.data
|
||||
this.openEva = true
|
||||
}).catch(err => {
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
},
|
||||
// ----订单批量操作------
|
||||
handleOrderSelectionChange(selection){
|
||||
this.batchIds = selection.map((item) => item.orderId)
|
||||
this.batchIds = selection.map((item) => item.orderId)
|
||||
this.batchList = selection;
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
//批量退单
|
||||
handleBatchRefund(){
|
||||
this.handleType="退单"
|
||||
this.ableList = []
|
||||
this.unableList = []
|
||||
this.unableList = []
|
||||
this.batchList.forEach(item=>{
|
||||
if(item.orderState==1||item.orderState==2){
|
||||
this.ableList.push(item)
|
||||
|
|
@ -856,7 +867,7 @@ export default {
|
|||
handleBatchWriteOff(){
|
||||
this.handleType="核销"
|
||||
this.ableList = []
|
||||
this.unableList = []
|
||||
this.unableList = []
|
||||
this.batchList.forEach(item=>{
|
||||
if(item.orderState==1||item.orderState==5){
|
||||
this.ableList.push(item)
|
||||
|
|
@ -873,18 +884,18 @@ export default {
|
|||
this.ableList.forEach(item=>{
|
||||
let param = {
|
||||
orderId:item.orderId
|
||||
}
|
||||
}
|
||||
refundOrderApi(param).then(response => {
|
||||
// if(response.code!=200){
|
||||
// this.$modal.msgError(response.msg);
|
||||
// }
|
||||
});
|
||||
})
|
||||
this.$modal.msgSuccess("批量退单完成");
|
||||
this.$modal.msgSuccess("批量退单完成");
|
||||
}
|
||||
if(this.handleType=="核销"){
|
||||
this.ableList.forEach(item=>{
|
||||
let param = {
|
||||
let param = {
|
||||
orderIdList:[item.orderId ]
|
||||
}
|
||||
writeOffOrderApi(param).then(response => {
|
||||
|
|
@ -893,12 +904,12 @@ export default {
|
|||
// }
|
||||
});
|
||||
})
|
||||
this.$modal.msgSuccess("批量核销完成");
|
||||
this.$modal.msgSuccess("批量核销完成");
|
||||
}
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
setTimeout(()=>{
|
||||
this.openRemind = false
|
||||
this.getList()
|
||||
this.getList()
|
||||
},500)
|
||||
}
|
||||
},
|
||||
|
|
@ -931,7 +942,7 @@ export default {
|
|||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue