|
|
@@ -0,0 +1,621 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
+ <el-form-item label="所属部门" prop="deptId">
|
|
|
+ <treeselect style="width:220px" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择所属部门" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="店铺" prop="storeId">
|
|
|
+ <el-select v-model="queryParams.storeId" placeholder="店铺" clearable size="small" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in storeOPtions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="会员ID" prop="userId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.userId"
|
|
|
+ placeholder="请输入会员ID"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="订单号" prop="orderCode">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.orderCode"
|
|
|
+ placeholder="请输入订单号"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="员工姓名" prop="companyUserNickName">
|
|
|
+ <el-input
|
|
|
+ style="width:220px"
|
|
|
+ v-model="queryParams.companyUserNickName"
|
|
|
+ placeholder="请输入员工姓名"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="物流状态" prop="deliveryStatus">
|
|
|
+ <el-select style="width:220px" v-model="queryParams.deliveryStatus" placeholder="请选择物流状态" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in deliveryStatusOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="结算状态" prop="deliveryPayStatus">
|
|
|
+ <el-select style="width:220px" v-model="queryParams.deliveryPayStatus" placeholder="请选择物流结算状态" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in deliveryPayStatusOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="收货人" prop="userName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.userName"
|
|
|
+ placeholder="请输入收货人"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="套餐名称" prop="packageSecondName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.packageSecondName"
|
|
|
+ placeholder="请输入套餐别名"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否首次进线" prop="isFirst">
|
|
|
+ <el-select filterable v-model="queryParams.isFirst" placeholder="状态" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in orOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="档期归属" prop="scheduleId">
|
|
|
+ <el-select multiple filterable style="width: 200px" v-model="scheduleIdArr" placeholder="请选择档期" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in scheduleOptions"
|
|
|
+ :key="'scheduleId'+item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="订单购买类型" prop="orderBuyType">
|
|
|
+ <el-select multiple filterable style="width: 200px" v-model="buyTypeArr" placeholder="请选择购买类型" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in orderBuyTypeOptions"
|
|
|
+ :key="'bugType'+item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="渠道" prop="channel">
|
|
|
+ <el-select multiple filterable style="width: 200px" v-model="channelArr" placeholder="请选择渠道" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in channelOptions"
|
|
|
+ :key="'channel'+item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="企微主体" prop="qwSubject">
|
|
|
+ <el-select multiple filterable style="width: 200px" v-model="qwSubjectArr" placeholder="请选择企微主体" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in qwSubjectOptions"
|
|
|
+ :key="'qwSubject'+item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="电话" prop="userPhone">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.userPhone"
|
|
|
+ placeholder="请输入收货人电话"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="加密电话" prop="userPhoneMk">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.userPhoneMk"
|
|
|
+ placeholder="请输入收货人电话"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="医生姓名" prop="doctorName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.doctorName"
|
|
|
+ placeholder="请输入医生姓名"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="患者姓名" prop="patientName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.patientName"
|
|
|
+ placeholder="请输入患者姓名"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="订单来源" prop="source">
|
|
|
+ <el-select v-model="queryParams.source" placeholder="请选择是否支付" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in sourceOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="订单类型" prop="orderType">
|
|
|
+ <el-select v-model="queryParams.orderType" placeholder="状态" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in orderTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付方式" prop="payType">
|
|
|
+ <el-select multiple v-model="payTypeArr" placeholder="请选择支付方式" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in PayOptions"
|
|
|
+ :key="'type'+item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="快递单号" prop="deliverySn">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.deliverySn"
|
|
|
+ placeholder="请输入快递单号"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="下单时间" prop="createTime">
|
|
|
+ <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付时间" prop="payTime">
|
|
|
+ <el-date-picker v-model="payTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changePayTime"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="发货时间" prop="deliverySendTime">
|
|
|
+ <el-date-picker v-model="deliverySendTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="入账时间" prop="tuiMoneyTime">
|
|
|
+ <el-date-picker v-model="tuiMoneyTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
|
|
|
+ </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-check"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ v-hasPermi="['his:storeOrder:approveOrder']"
|
|
|
+ @click="handleBatchAudit"
|
|
|
+ >批量审核</el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table height="450" v-loading="loading" border :data="orderList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="药品订单号" align="center" prop="orderCode" width="180px"/>
|
|
|
+ <el-table-column label="所属公司" align="center" prop="companyName" />
|
|
|
+ <el-table-column label="员工" align="center" prop="companyUserName" />
|
|
|
+ <el-table-column label="就诊人" align="center" prop="patientName" />
|
|
|
+ <el-table-column label="收货人" align="center" prop="userName" />
|
|
|
+ <el-table-column label="套餐名称" align="center" prop="packageName" />
|
|
|
+ <el-table-column label="套餐别名" align="center" prop="packageSecondName" />
|
|
|
+ <el-table-column label="应收金额" align="center" prop="payPrice" />
|
|
|
+ <el-table-column label="实收金额" align="center" prop="payMoney" />
|
|
|
+ <el-table-column label="支付方式" align="center" prop="payType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="PayOptions" :value="scope.row.payType"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订单来源" align="center" prop="source">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="sourceOptions" :value="scope.row.source"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
|
|
|
+ <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
|
|
|
+ <el-table-column label="订单状态" align="center" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="orderOptions" :value="scope.row.status"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="物流状态" align="center" prop="deliveryStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="结算状态" align="center" prop="deliveryPayStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ v-hasPermi="['his:storeOrder:approveOrder']"
|
|
|
+ @click="handleAudit(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"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {listOrder, approveOrder, approveOrderList} from "@/api/store/storeOrder";
|
|
|
+import { getTcmScheduleList } from "@/api/company/tcmScheduleReport";
|
|
|
+import { treeselect } from "@/api/company/companyDept";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import { listStore } from "@/api/store/storeProduct";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "Order",
|
|
|
+ components: { Treeselect },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ payTypeArr: [],
|
|
|
+ scheduleIdArr: [],
|
|
|
+ buyTypeArr: [],
|
|
|
+ channelArr: [],
|
|
|
+ qwSubjectArr: [],
|
|
|
+ // 部门树选项
|
|
|
+ deptOptions: [],
|
|
|
+ deptName: undefined,
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ sourceOptions: [],
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 订单表格数据
|
|
|
+ orderList: [],
|
|
|
+ createTime: null,
|
|
|
+ payTime: null,
|
|
|
+ deliverySendTime: null,
|
|
|
+ tuiMoneyTime: null,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ storeId: null,
|
|
|
+ orderCode: null,
|
|
|
+ userId: null,
|
|
|
+ userName: null,
|
|
|
+ userPhone: null,
|
|
|
+ userPhoneMk: null,
|
|
|
+ deliverySn: null,
|
|
|
+ deliveryStatus: null,
|
|
|
+ deliveryPayStatus: null,
|
|
|
+ companyUserNickName: null,
|
|
|
+ packageSecondName: null,
|
|
|
+ isFirst: null,
|
|
|
+ source: null,
|
|
|
+ orderType: null,
|
|
|
+ doctorName: null,
|
|
|
+ patientName: null,
|
|
|
+ deptId: null,
|
|
|
+ scheduleId: null,
|
|
|
+ orderBuyType: null,
|
|
|
+ orderChannel: null,
|
|
|
+ qwSubject: null,
|
|
|
+ payType: null,
|
|
|
+ status: null,
|
|
|
+ sTime: null,
|
|
|
+ eTime: null,
|
|
|
+ paysTime: null,
|
|
|
+ payeTime: null,
|
|
|
+ deliverySendsTime: null,
|
|
|
+ deliverySendeTime: null,
|
|
|
+ tuisTime: null,
|
|
|
+ tuieTime: null,
|
|
|
+ isPay: 1
|
|
|
+ },
|
|
|
+ PayOptions: [],
|
|
|
+ orderOptions: [],
|
|
|
+ channelOptions: [],
|
|
|
+ qwSubjectOptions: [],
|
|
|
+ orderTypeOptions: [],
|
|
|
+ orOptions: [],
|
|
|
+ storeOPtions: [],
|
|
|
+ deliveryPayStatusOptions: [],
|
|
|
+ deliveryStatusOptions: [],
|
|
|
+ orderBuyTypeOptions: [],
|
|
|
+ scheduleOptions: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ deptName(val) {
|
|
|
+ this.$refs.tree.filter(val);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getTreeselect();
|
|
|
+ this.getstoreList();
|
|
|
+ this.getList();
|
|
|
+ this.getTcmScheduleList();
|
|
|
+ this.getDicts("sys_store_order_buy_type").then(response => {
|
|
|
+ this.orderBuyTypeOptions = response.data;
|
|
|
+ this.orderBuyTypeOptions.push({ dictLabel: "无", dictValue: "-1" });
|
|
|
+ });
|
|
|
+ this.getDicts("sys_order_source").then(response => {
|
|
|
+ this.sourceOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_store_pay_type").then(response => {
|
|
|
+ this.PayOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_store_order_type").then(response => {
|
|
|
+ this.orderTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_order_status").then(response => {
|
|
|
+ this.orderOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_store_channel").then(response => {
|
|
|
+ this.channelOptions = response.data;
|
|
|
+ this.channelOptions.push({ dictLabel: "无", dictValue: "-1" });
|
|
|
+ });
|
|
|
+ this.getDicts("sys_store_qw_subject").then(response => {
|
|
|
+ this.qwSubjectOptions = response.data;
|
|
|
+ this.qwSubjectOptions.push({ dictLabel: "无", dictValue: "-1" });
|
|
|
+ });
|
|
|
+ this.getDicts("sys_company_or").then(response => {
|
|
|
+ this.orOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_store_delivery_pay_status").then(response => {
|
|
|
+ this.deliveryPayStatusOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_store_order_delivery_status").then(response => {
|
|
|
+ this.deliveryStatusOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then((response) => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 查询档期列表 */
|
|
|
+ getTcmScheduleList() {
|
|
|
+ getTcmScheduleList().then(response => {
|
|
|
+ this.scheduleOptions = response.data;
|
|
|
+ this.scheduleOptions.push({ id: "-1", name: "无" });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getstoreList() {
|
|
|
+ listStore().then(response => {
|
|
|
+ this.storeOPtions = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 查询订单列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ this.queryParams.isPay = 1;
|
|
|
+ // 处理多选参数
|
|
|
+ if (this.payTypeArr.length > 0) {
|
|
|
+ this.queryParams.payType = this.payTypeArr.toString();
|
|
|
+ } else {
|
|
|
+ this.queryParams.payType = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.scheduleIdArr.length > 0) {
|
|
|
+ this.queryParams.scheduleId = this.scheduleIdArr.toString();
|
|
|
+ } else {
|
|
|
+ this.queryParams.scheduleId = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.buyTypeArr.length > 0) {
|
|
|
+ this.queryParams.orderBuyType = this.buyTypeArr.toString();
|
|
|
+ } else {
|
|
|
+ this.queryParams.orderBuyType = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.channelArr.length > 0) {
|
|
|
+ this.queryParams.orderChannel = this.channelArr.toString();
|
|
|
+ } else {
|
|
|
+ this.queryParams.orderChannel = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.qwSubjectArr.length > 0) {
|
|
|
+ this.queryParams.qwSubject = this.qwSubjectArr.toString();
|
|
|
+ } else {
|
|
|
+ this.queryParams.qwSubject = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ approveOrderList(this.queryParams).then(response => {
|
|
|
+ this.orderList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 审核按钮操作 */
|
|
|
+ handleAudit(row) {
|
|
|
+ this.$confirm('确定要审核该订单吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // 将当前行的orderId放入数组中传递给后端
|
|
|
+ const orderIds = [row.orderId];
|
|
|
+ approveOrder(orderIds).then(response => {
|
|
|
+ this.msgSuccess('审核成功');
|
|
|
+ this.getList(); // 审核成功后刷新列表
|
|
|
+ }).catch(error => {
|
|
|
+ console.error('审核失败:', error);
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.info('已取消审核');
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.isPay = 1;
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+
|
|
|
+ changeTime() {
|
|
|
+ if (this.createTime != null) {
|
|
|
+ this.queryParams.sTime = this.createTime[0];
|
|
|
+ this.queryParams.eTime = this.createTime[1];
|
|
|
+ } else {
|
|
|
+ this.queryParams.sTime = null;
|
|
|
+ this.queryParams.eTime = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.deliverySendTime != null) {
|
|
|
+ this.queryParams.deliverySendsTime = this.deliverySendTime[0];
|
|
|
+ this.queryParams.deliverySendeTime = this.deliverySendTime[1];
|
|
|
+ } else {
|
|
|
+ this.queryParams.deliverySendsTime = null;
|
|
|
+ this.queryParams.deliverySendeTime = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.tuiMoneyTime != null) {
|
|
|
+ this.queryParams.tuisTime = this.tuiMoneyTime[0];
|
|
|
+ this.queryParams.tuieTime = this.tuiMoneyTime[1];
|
|
|
+ } else {
|
|
|
+ this.queryParams.tuisTime = null;
|
|
|
+ this.queryParams.tuieTime = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ changePayTime() {
|
|
|
+ if (this.payTime != null) {
|
|
|
+ this.queryParams.paysTime = this.payTime[0];
|
|
|
+ this.queryParams.payeTime = this.payTime[1];
|
|
|
+ } else {
|
|
|
+ this.queryParams.paysTime = null;
|
|
|
+ this.queryParams.payeTime = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.createTime = null;
|
|
|
+ this.payTime = null;
|
|
|
+ this.deliverySendTime = null;
|
|
|
+ this.tuiMoneyTime = null;
|
|
|
+ this.payTypeArr = [];
|
|
|
+ this.scheduleIdArr = [];
|
|
|
+ this.buyTypeArr = [];
|
|
|
+ this.channelArr = [];
|
|
|
+ this.qwSubjectArr = [];
|
|
|
+ this.queryParams.isPay = 1;
|
|
|
+
|
|
|
+ this.queryParams.sTime = null;
|
|
|
+ this.queryParams.eTime = null;
|
|
|
+ this.queryParams.paysTime = null;
|
|
|
+ this.queryParams.payeTime = null;
|
|
|
+ this.queryParams.deliverySendsTime = null;
|
|
|
+ this.queryParams.deliverySendeTime = null;
|
|
|
+ this.queryParams.tuisTime = null;
|
|
|
+ this.queryParams.tuieTime = null;
|
|
|
+ this.queryParams.payType = null;
|
|
|
+ this.queryParams.scheduleId = null;
|
|
|
+ this.queryParams.orderBuyType = null;
|
|
|
+ this.queryParams.orderChannel = null;
|
|
|
+ this.queryParams.qwSubject = null;
|
|
|
+
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map(item => item.orderId);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
+ },
|
|
|
+ /** 批量审核按钮操作 */
|
|
|
+ handleBatchAudit() {
|
|
|
+ if (this.ids.length === 0) {
|
|
|
+ this.$message.warning('请先选择要审核的订单');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$confirm(`确定要审核选中的${this.ids.length}条订单吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // 直接传递选中的ids数组给后端
|
|
|
+ approveOrder(this.ids).then(response => {
|
|
|
+ this.msgSuccess('批量审核成功');
|
|
|
+ this.getList(); // 审核成功后刷新列表
|
|
|
+ }).catch(error => {
|
|
|
+ console.error('批量审核失败:', error);
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.info('已取消审核');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|