|
@@ -0,0 +1,916 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="所属部门" prop="deptId">
|
|
|
|
+ <treeselect style="width:220px" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择所属部门" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="店铺" prop="storeId">
|
|
|
|
+ <el-select v-model="queryParams.storeId" style="width:220px" placeholder="店铺" clearable size="small" filterable>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in storeOPtions"
|
|
|
|
+ :key="'ecStoreId'+dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="订单号" prop="orderCode">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.orderCode"
|
|
|
|
+ placeholder="请输入订单号"
|
|
|
|
+ clearable
|
|
|
|
+ style="width:220px"
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+<!-- <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-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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="'ecDeliveryStatus'+item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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="'ecDeliveryPayStatus'+item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="收货人" prop="userName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.userName"
|
|
|
|
+ placeholder="请输入收货人"
|
|
|
|
+ style="width:220px"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="套餐名称" prop="packageSecondName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.packageSecondName"
|
|
|
|
+ placeholder="请输入套餐别名"
|
|
|
|
+ style="width:220px"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="是否首次进线" prop="isFirst">
|
|
|
|
+ <el-select filterable v-model="queryParams.isFirst" style="width:220px" placeholder="状态" clearable size="small">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in orOptions"
|
|
|
|
+ :key="'ecIsFirst'+dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="档期归属" prop="scheduleId" >
|
|
|
|
+ <el-select multiple filterable style="width: 220px" v-model="scheduleIdArr" placeholder="请选择档期" clearable size="small" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in scheduleOptions"
|
|
|
|
+ :key="'ecScheduleId'+item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="订单购买类型" prop="orderBuyType">
|
|
|
|
+ <el-select multiple filterable style="width: 220px" v-model="buyTypeArr" placeholder="请选择购买类型" clearable size="small" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in orderBuyTypeOptions"
|
|
|
|
+ :key="'ecOrderBuyType'+item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="渠道" prop="channel">
|
|
|
|
+ <el-select multiple filterable style="width: 220px" v-model="channelArr" placeholder="请选择渠道" clearable size="small" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in channelOptions"
|
|
|
|
+ :key="'ecChannel'+item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="企微主体" prop="qwSubject">
|
|
|
|
+ <el-select multiple filterable style="width: 220px" v-model="qwSubjectArr" placeholder="请选择企微主体" clearable size="small" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in qwSubjectOptions"
|
|
|
|
+ :key="'ecQwSubject'+item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="电话" prop="userPhone">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.userPhone"
|
|
|
|
+ placeholder="请输入收货人电话"
|
|
|
|
+ clearable
|
|
|
|
+ style="width:220px"
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="加密电话" prop="userPhoneMk">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.userPhoneMk"
|
|
|
|
+ placeholder="请输入收货人电话"
|
|
|
|
+ clearable
|
|
|
|
+ style="width:220px"
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="医生姓名" prop="doctorName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.doctorName"
|
|
|
|
+ placeholder="请输入医生姓名"
|
|
|
|
+ clearable
|
|
|
|
+ style="width:220px"
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="患者姓名" prop="patientName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.patientName"
|
|
|
|
+ placeholder="请输入患者姓名"
|
|
|
|
+ clearable
|
|
|
|
+ style="width:220px"
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="订单来源" prop="source">
|
|
|
|
+ <el-select v-model="queryParams.source" style="width:220px" placeholder="请选择是否支付" clearable size="small">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in sourceOptions"
|
|
|
|
+ :key="'ecSource'+dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="订单类型" prop="orderType">
|
|
|
|
+ <el-select v-model="queryParams.orderType" style="width:220px" placeholder="状态" clearable size="small">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in orderTypeOptions"
|
|
|
|
+ :key="'ecOrderType'+dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="支付方式" prop="payType">
|
|
|
|
+ <el-select multiple v-model="payTypeArr" style="width:220px" placeholder="请选择支付方式" clearable size="small" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in PayOptions"
|
|
|
|
+ :key="'ecPayType'+item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="订单状态" prop="status">
|
|
|
|
+ <el-select multiple v-model="queryParams.status" style="width:220px" placeholder="请选择订单状态" clearable size="small" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in orderOptions"
|
|
|
|
+ :key="'ecStatus'+item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <el-form-item label="快递单号" prop="deliverySn">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.deliverySn"
|
|
|
|
+ placeholder="请输入快递单号"
|
|
|
|
+ clearable
|
|
|
|
+ style="width:220px"
|
|
|
|
+ size="small"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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-col>
|
|
|
|
+ <el-col :span="7">
|
|
|
|
+ <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-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+
|
|
|
|
+ <el-button
|
|
|
|
+ type="warning"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ size="mini"
|
|
|
|
+ :loading="exportLoading"
|
|
|
|
+ @click="handleExport"
|
|
|
|
+ v-hasPermi="['his:storeOrder:export']"
|
|
|
|
+ >导出</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="药品订单号12" 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="['store:storeOrder:query']"
|
|
|
|
+ @click="handledetails(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-drawer
|
|
|
|
+ :with-header="false"
|
|
|
|
+ size="75%"
|
|
|
|
+ :title="show.title" :visible.sync="show.open">
|
|
|
|
+ <storeOrderDetails ref="Details" />
|
|
|
|
+ </el-drawer>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder,importTemplate } from "@/api/store/storeOrder";
|
|
|
|
+import storeOrderDetails from '../../store/components/storeOrderDetails.vue';
|
|
|
|
+import { getTcmScheduleList } from "@/api/company/tcmScheduleReport";
|
|
|
|
+import {listStore} from "@/api/store/storeProduct";
|
|
|
|
+import { treeselect } from "@/api/company/companyDept";
|
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
+import { getTask } from "@/api/common";
|
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
+export default {
|
|
|
|
+ name: "externalContactOrder",
|
|
|
|
+ components: { storeOrderDetails ,Treeselect},
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ payTypeArr:[],
|
|
|
|
+ scheduleIdArr:[],
|
|
|
|
+ buyTypeArr:[],
|
|
|
|
+ channelArr:[],
|
|
|
|
+ qwSubjectArr:[],
|
|
|
|
+ // 部门树选项
|
|
|
|
+ deptOptions: [],
|
|
|
|
+ deptName:undefined,
|
|
|
|
+ actName:"10",
|
|
|
|
+ show:{
|
|
|
|
+ title:"订单详情",
|
|
|
|
+ open:false,
|
|
|
|
+ },
|
|
|
|
+ // 遮罩层
|
|
|
|
+ loading: true,
|
|
|
|
+ sourceOptions:[],
|
|
|
|
+ // 导出遮罩层
|
|
|
|
+ exportLoading: false,
|
|
|
|
+ // 选中数组
|
|
|
|
+ ids: [],
|
|
|
|
+ // 非单个禁用
|
|
|
|
+ single: true,
|
|
|
|
+ // 非多个禁用
|
|
|
|
+ multiple: true,
|
|
|
|
+ // 显示搜索条件
|
|
|
|
+ showSearch: true,
|
|
|
|
+ // 总条数
|
|
|
|
+ total: 0,
|
|
|
|
+ // 订单表格数据
|
|
|
|
+ orderList: [],
|
|
|
|
+ // 弹出层标题
|
|
|
|
+ title: "",
|
|
|
|
+ createTime:null,
|
|
|
|
+ payTime:null,
|
|
|
|
+ deliveryImportTime:null,
|
|
|
|
+ deliverySendTime:null,
|
|
|
|
+ tuiMoneyTime:null,
|
|
|
|
+ // 是否显示弹出层
|
|
|
|
+ open: false,
|
|
|
|
+ // 查询参数
|
|
|
|
+ queryParams: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ storeId: null,
|
|
|
|
+ orderCode: null,
|
|
|
|
+ userId: null,
|
|
|
|
+ userName: null,
|
|
|
|
+ userPhone: null,
|
|
|
|
+ userPhoneMk: null,
|
|
|
|
+ userAddress: null,
|
|
|
|
+ cartId: null,
|
|
|
|
+ totalNum: null,
|
|
|
|
+ totalPrice: null,
|
|
|
|
+ payPrice: null,
|
|
|
|
+ payMoney: null,
|
|
|
|
+ isPay: null,
|
|
|
|
+ payTime: null,
|
|
|
|
+ payType: null,
|
|
|
|
+ status: null,
|
|
|
|
+ refundStatus: null,
|
|
|
|
+ refundImg: null,
|
|
|
|
+ refundExplain: null,
|
|
|
|
+ refundTime: null,
|
|
|
|
+ refundReason: null,
|
|
|
|
+ refundMoney: null,
|
|
|
|
+ deliveryCode: null,
|
|
|
|
+ deliveryName: null,
|
|
|
|
+ deliverySn: null,
|
|
|
|
+ isDel: null,
|
|
|
|
+ costPrice: null,
|
|
|
|
+ verifyCode: null,
|
|
|
|
+ shippingType: null,
|
|
|
|
+ isChannel: null,
|
|
|
|
+ isPrescribe: null,
|
|
|
|
+ prescribeId: null,
|
|
|
|
+ finishTime: null,
|
|
|
|
+ patientName: null,
|
|
|
|
+ doctorName: null,
|
|
|
|
+ sTime:null,
|
|
|
|
+ eTime:null,
|
|
|
|
+ paysTime:null,
|
|
|
|
+ payeTime:null,
|
|
|
|
+ deliveryTime: null,
|
|
|
|
+ tuiMoney: null,
|
|
|
|
+ tuiMoneyStatus: null,
|
|
|
|
+ tuisTime:null,
|
|
|
|
+ tuieTime:null,
|
|
|
|
+ tuiUserId: null,
|
|
|
|
+ orderCreateType: null,
|
|
|
|
+ companyUserName:null,
|
|
|
|
+ companyName:null,
|
|
|
|
+ packageSecondName:null,
|
|
|
|
+ isFirst:null,
|
|
|
|
+ source:null,
|
|
|
|
+ },
|
|
|
|
+ // 表单参数
|
|
|
|
+ form: {},
|
|
|
|
+ // 表单校验
|
|
|
|
+ rules: {
|
|
|
|
+ },
|
|
|
|
+ PayOptions:[],
|
|
|
|
+ orderOptions:[],
|
|
|
|
+ payStatusOptions:[],
|
|
|
|
+ refundOptions:[],
|
|
|
|
+ channelOptions:[],
|
|
|
|
+ qwSubjectOptions:[],
|
|
|
|
+ orderTypeOptions:[],
|
|
|
|
+ tuiOptions:[],
|
|
|
|
+ orOptions:[],
|
|
|
|
+ storeOPtions:[],
|
|
|
|
+ deliveryPayStatusOptions:[],
|
|
|
|
+ deliveryStatusOptions:[],
|
|
|
|
+ orderBuyTypeOptions:[],
|
|
|
|
+ scheduleOptions:[],
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ // 根据名称筛选部门树
|
|
|
|
+ deptName(val) {
|
|
|
|
+ this.$refs.tree.filter(val);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getTreeselect();
|
|
|
|
+ this.getstoreList();
|
|
|
|
+ this.getList();
|
|
|
|
+ getTcmScheduleList().then(response => {
|
|
|
|
+ this.scheduleOptions = response.data;
|
|
|
|
+ this.scheduleOptions.push({id: "-1",
|
|
|
|
+ name: "无"})
|
|
|
|
+ });
|
|
|
|
+ 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_order_pay").then(response => {
|
|
|
|
+ this.payStatusOptions = response.data;
|
|
|
|
+ });
|
|
|
|
+ this.getDicts("sys_refund_status").then(response => {
|
|
|
|
+ this.refundOptions = 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_tui_money_status").then(response => {
|
|
|
|
+ this.tuiOptions = response.data;
|
|
|
|
+ });
|
|
|
|
+ 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;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 筛选节点
|
|
|
|
+ filterNode(value, data) {
|
|
|
|
+ if (!value) return true;
|
|
|
|
+ return data.label.indexOf(value) !== -1;
|
|
|
|
+ },
|
|
|
|
+ // 节点单击事件
|
|
|
|
+ handleNodeClick(data) {
|
|
|
|
+ this.queryParams.deptId = data.id;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ /** 导入按钮操作 */
|
|
|
|
+ handleImport() {
|
|
|
|
+ this.upload.title = "商品导入";
|
|
|
|
+ this.upload.open = true;
|
|
|
|
+ },
|
|
|
|
+ /** 下载模板操作 */
|
|
|
|
+ importTemplate() {
|
|
|
|
+ importTemplate().then(response => {
|
|
|
|
+ this.download(response.msg);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handledetails(row){
|
|
|
|
+ this.show.open=true;
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$refs.Details.getDetails(row.orderId,row.nickName,row.storeName);
|
|
|
|
+ }, 1);
|
|
|
|
+ },
|
|
|
|
+ getstoreList() {
|
|
|
|
+ listStore().then(response => {
|
|
|
|
+ this.storeOPtions = response.rows;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 查询订单列表 */
|
|
|
|
+ getList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ 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
|
|
|
|
+ }
|
|
|
|
+ listOrder(this.queryParams).then(response => {
|
|
|
|
+ this.orderList = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 取消按钮
|
|
|
|
+ cancel() {
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.reset();
|
|
|
|
+ },
|
|
|
|
+ // 表单重置
|
|
|
|
+ reset() {
|
|
|
|
+ this.form = {
|
|
|
|
+ orderId: null,
|
|
|
|
+ storeId: null,
|
|
|
|
+ orderCode: null,
|
|
|
|
+ //userId: null,
|
|
|
|
+ userName: null,
|
|
|
|
+ userPhone: null,
|
|
|
|
+ userAddress: null,
|
|
|
|
+ cartId: null,
|
|
|
|
+ totalNum: null,
|
|
|
|
+ totalPrice: null,
|
|
|
|
+ payPrice: null,
|
|
|
|
+ payMoney: null,
|
|
|
|
+ isPay: null,
|
|
|
|
+ payTime: null,
|
|
|
|
+ payType: null,
|
|
|
|
+ createTime: null,
|
|
|
|
+ updateTime: null,
|
|
|
|
+ status: null,
|
|
|
|
+ refundStatus: "0",
|
|
|
|
+ refundImg: null,
|
|
|
|
+ refundExplain: null,
|
|
|
|
+ refundTime: null,
|
|
|
|
+ refundReason: null,
|
|
|
|
+ refundMoney: null,
|
|
|
|
+ deliveryCode: null,
|
|
|
|
+ deliveryName: null,
|
|
|
|
+ deliverySn: null,
|
|
|
|
+ remark: null,
|
|
|
|
+ isDel: null,
|
|
|
|
+ costPrice: null,
|
|
|
|
+ verifyCode: null,
|
|
|
|
+ shippingType: null,
|
|
|
|
+ isChannel: null,
|
|
|
|
+ isPrescribe: null,
|
|
|
|
+ prescribeId: null,
|
|
|
|
+ finishTime: null,
|
|
|
|
+ deliveryTime: null,
|
|
|
|
+ tuiMoney: null,
|
|
|
|
+ tuiMoneyStatus: 0,
|
|
|
|
+ tuiUserId: null,
|
|
|
|
+ orderCreateType: null
|
|
|
|
+ };
|
|
|
|
+ this.resetForm("form");
|
|
|
|
+ },
|
|
|
|
+ /** 搜索按钮操作 */
|
|
|
|
+ handleQuery() {
|
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ handleClickX(tab, event) {
|
|
|
|
+ if(tab.name=="10"){
|
|
|
|
+ this.queryParams.status=null;
|
|
|
|
+ }else{
|
|
|
|
+ this.queryParams.status=tab.name;
|
|
|
|
+ }
|
|
|
|
+ this.handleQuery();
|
|
|
|
+ },
|
|
|
|
+ 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.deliveryImportTime!=null){
|
|
|
|
+ this.queryParams.deliveryImportsTime=this.deliveryImportTime[0];
|
|
|
|
+ this.queryParams.deliveryImporteTime=this.deliveryImportTime[1];
|
|
|
|
+ }else{
|
|
|
|
+ this.queryParams.deliveryImportsTime=null;
|
|
|
|
+ this.queryParams.deliveryImporteTime=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.sTime=this.payTime[0];
|
|
|
|
+ this.queryParams.eTime=this.payTime[1];
|
|
|
|
+ }else{
|
|
|
|
+ this.queryParams.paysTime=null;
|
|
|
|
+ this.queryParams.payeTime=null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /** 重置按钮操作 */
|
|
|
|
+ resetQuery() {
|
|
|
|
+ this.resetForm("queryForm");
|
|
|
|
+ this.createTime=null;
|
|
|
|
+ this.queryParams.sTime=null;
|
|
|
|
+ this.queryParams.eTime=null;
|
|
|
|
+ this.payTime=null;
|
|
|
|
+ this.queryParams.paysTime=null;
|
|
|
|
+ this.queryParams.payeTime=null;
|
|
|
|
+ this.queryParams.deliveryImportTime = null;
|
|
|
|
+ this.queryParams.deliveryImportsTime = null;
|
|
|
|
+ this.queryParams.deliveryImporteTime = null;
|
|
|
|
+ this.queryParams.deliverySendTime = null;
|
|
|
|
+ this.queryParams.deliverySendsTime = null;
|
|
|
|
+ this.queryParams.deliverySendeTime = null;
|
|
|
|
+ this.queryParams.tuisTIme = null;
|
|
|
|
+ this.queryParams.tuieTIme = null;
|
|
|
|
+ this.handleQuery();
|
|
|
|
+ },
|
|
|
|
+ // 多选框选中数据
|
|
|
|
+ handleSelectionChange(selection) {
|
|
|
|
+ this.ids = selection.map(item => item.orderId)
|
|
|
|
+ this.single = selection.length!==1
|
|
|
|
+ this.multiple = !selection.length
|
|
|
|
+ },
|
|
|
|
+ /** 新增按钮操作 */
|
|
|
|
+ handleAdd() {
|
|
|
|
+ this.reset();
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "添加订单";
|
|
|
|
+ },
|
|
|
|
+ /** 修改按钮操作 */
|
|
|
|
+ handleUpdate(row) {
|
|
|
|
+ this.reset();
|
|
|
|
+ const orderId = row.orderId || this.ids
|
|
|
|
+ getOrder(orderId).then(response => {
|
|
|
|
+ this.form = response.data;
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "修改订单";
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 提交按钮 */
|
|
|
|
+ submitForm() {
|
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.form.orderId != null) {
|
|
|
|
+ updateOrder(this.form).then(response => {
|
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ addOrder(this.form).then(response => {
|
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 删除按钮操作 */
|
|
|
|
+ handleDelete(row) {
|
|
|
|
+ const orderIds = row.orderId || this.ids;
|
|
|
|
+ this.$confirm('是否确认删除订单编号为"' + orderIds + '"的数据项?', "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function() {
|
|
|
|
+ return delOrder(orderIds);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ },
|
|
|
|
+ /** 导出按钮操作 */
|
|
|
|
+ handleExport() {
|
|
|
|
+ var that=this;
|
|
|
|
+ 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
|
|
|
|
+ }
|
|
|
|
+ const queryParams = this.queryParams;
|
|
|
|
+ this.$confirm('是否确认导出所有订单数据项?', "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.exportLoading = true;
|
|
|
|
+ return exportOrder(queryParams);
|
|
|
|
+ }).then(response => {
|
|
|
|
+ if(response.code==200){
|
|
|
|
+ that.msgSuccess(response.msg);
|
|
|
|
+ that.taskId=response.data;
|
|
|
|
+ that.time=setInterval(function(){
|
|
|
|
+ //查订单
|
|
|
|
+ getTask(that.taskId).then(res => {
|
|
|
|
+ if(res.data.status==1){
|
|
|
|
+ that.exportLoading = false;
|
|
|
|
+ clearTimeout(that.time)
|
|
|
|
+ that.time=null;
|
|
|
|
+ that.download(res.data.fileUrl);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },10000);
|
|
|
|
+ }
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ },
|
|
|
|
+ getData(id){
|
|
|
|
+ this.queryParams.userId = id;
|
|
|
|
+ this.getList();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|