|
@@ -1,22 +1,22 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="68px">
|
|
|
|
|
|
<el-form-item label="订单号" prop="orderCode">
|
|
|
<el-input
|
|
|
v-model="queryParams.orderCode"
|
|
|
- placeholder="请输入订单号"
|
|
|
clearable
|
|
|
+ placeholder="请输入订单号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="运单号" prop="deliveryId">
|
|
|
+ <el-form-item label="运单号" prop="deliveryId">
|
|
|
<el-input
|
|
|
v-model="queryParams.deliveryId"
|
|
|
- placeholder="请输入运单号"
|
|
|
clearable
|
|
|
+ placeholder="请输入运单号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
@@ -25,8 +25,8 @@
|
|
|
<el-form-item label="手机号" prop="userPhone">
|
|
|
<el-input
|
|
|
v-model="queryParams.userPhone"
|
|
|
- placeholder="请输入手机号"
|
|
|
clearable
|
|
|
+ placeholder="请输入手机号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
@@ -35,8 +35,8 @@
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.realName"
|
|
|
- placeholder="请输入收件人姓名"
|
|
|
clearable
|
|
|
+ placeholder="请输入收件人姓名"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
@@ -46,104 +46,112 @@
|
|
|
<el-input
|
|
|
|
|
|
v-model="queryParams.productName"
|
|
|
- placeholder="请输入产品名"
|
|
|
clearable
|
|
|
+ placeholder="请输入产品名"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
-<!-- <el-form-item label="订单类型" prop="orderType">
|
|
|
- <el-select v-model="queryParams.orderType" placeholder="请选择订单类型" clearable size="small" >
|
|
|
- <el-option
|
|
|
- v-for="item in orderTypeOptions"
|
|
|
- :key="item.dictValue"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>-->
|
|
|
-<!-- <el-form-item label="上传凭证" prop="isUpload">
|
|
|
- <el-select v-model="queryParams.isUpload" placeholder="请选择" clearable size="small" >
|
|
|
- <el-option key="0" label="未上传" value="0" />
|
|
|
- <el-option key="1" label="已上传" value="1" />
|
|
|
- </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="item in orderTypeOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>-->
|
|
|
+ <!-- <el-form-item label="上传凭证" prop="isUpload">
|
|
|
+ <el-select v-model="queryParams.isUpload" placeholder="请选择" clearable size="small" >
|
|
|
+ <el-option key="0" label="未上传" value="0" />
|
|
|
+ <el-option key="1" label="已上传" value="1" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item label="物流状态" prop="deliveryStatus">
|
|
|
- <el-select 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 v-model="queryParams.deliveryStatus" clearable placeholder="请选择物流状态" 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: 200px" 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 v-model="queryParams.deliveryPayStatus" clearable placeholder="请选择物流结算状态"
|
|
|
+ size="small" style="width: 200px"
|
|
|
+ >
|
|
|
+ <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="payType">
|
|
|
- <el-select style="width: 200px" v-model="queryParams.payType" placeholder="请选择支付方式" clearable size="small" >
|
|
|
- <el-option
|
|
|
- v-for="item in payTypeOptions"
|
|
|
- :key="item.dictValue"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- />
|
|
|
+ <el-form-item label="支付方式" prop="payType">
|
|
|
+ <el-select v-model="queryParams.payType" clearable placeholder="请选择支付方式" size="small"
|
|
|
+ style="width: 200px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in payTypeOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="下单时间" prop="createTimeRange">
|
|
|
<el-date-picker
|
|
|
- style="width:205.4px"
|
|
|
- clearable size="small"
|
|
|
v-model="createTimeRange"
|
|
|
+ clearable end-placeholder="结束日期"
|
|
|
+ size="small"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width:205.4px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="支付时间" prop="payTimeRange">
|
|
|
<el-date-picker
|
|
|
- style="width:205.4px"
|
|
|
- clearable size="small"
|
|
|
v-model="payTimeRange"
|
|
|
+ clearable end-placeholder="结束日期"
|
|
|
+ size="small"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width:205.4px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发货时间" prop="deliverySendTimeRange">
|
|
|
<el-date-picker
|
|
|
- style="width:205.4px"
|
|
|
- clearable size="small"
|
|
|
v-model="deliverySendTimeRange"
|
|
|
+ clearable end-placeholder="结束日期"
|
|
|
+ size="small"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width:205.4px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="回单时间" prop="deliveryImportTimeRange">
|
|
|
<el-date-picker
|
|
|
- style="width:205.4px"
|
|
|
- clearable size="small"
|
|
|
v-model="deliveryImportTimeRange"
|
|
|
+ clearable end-placeholder="结束日期"
|
|
|
+ size="small"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width:205.4px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-search" size="mini" type="cyan" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -158,30 +166,55 @@
|
|
|
>创建订单</el-button>
|
|
|
</el-col> -->
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button plain type="info" icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['store:storeOrder:importExpress']">导入银行回单</el-button>
|
|
|
+ <el-button v-hasPermi="['store:storeOrder:importExpress']" icon="el-icon-upload2" plain size="mini" type="info"
|
|
|
+ @click="handleImport"
|
|
|
+ >导入银行回单
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="warning"
|
|
|
+ v-hasPermi="['store:healthStoreOrder:export']"
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['store:healthStoreOrder:export']"
|
|
|
- >导出订单</el-button>
|
|
|
+ type="warning"
|
|
|
+ @click="handleExport"
|
|
|
+ >导出订单
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
+ <el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="warning"
|
|
|
+ v-hasPermi="['store:healthStoreOrder:exportItems']"
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
- @click="handleExportItems"
|
|
|
- v-hasPermi="['store:healthStoreOrder:exportItems']"
|
|
|
- >导出订单明细</el-button>
|
|
|
+ type="warning"
|
|
|
+ @click="handleExportItems"
|
|
|
+ >导出订单明细
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
-
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-s-order"
|
|
|
+ size="mini"
|
|
|
+ type="warning"
|
|
|
+ @click="openDeliveryNote"
|
|
|
+ >批量导入物流单号
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleOrderDelete"
|
|
|
+ v-hasPermi="['store:storeOrder:remove']"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
- <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
<el-tab-pane label="全部订单" name="00"></el-tab-pane>
|
|
|
<el-tab-pane label="待支付" name="0"></el-tab-pane>
|
|
|
<el-tab-pane label="待发货" name="1"></el-tab-pane>
|
|
@@ -191,18 +224,18 @@
|
|
|
<el-tab-pane label="已退款" name="-2"></el-tab-pane>
|
|
|
<el-tab-pane label="已取消" name="-3"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- <el-table height="500" border v-loading="loading" :data="storeOrderList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="订单号" align="center" prop="orderCode" width="200px" />
|
|
|
- <el-table-column label="用户昵称" align="center" prop="nickname" width="150px" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{scope.row.nickname}} </span>
|
|
|
- </template>
|
|
|
+ <el-table v-loading="loading" :data="storeOrderList" border height="500" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column align="center" type="selection" width="55"/>
|
|
|
+ <el-table-column align="center" label="订单号" prop="orderCode" width="200px"/>
|
|
|
+ <el-table-column align="center" label="用户昵称" prop="nickname" width="150px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.nickname }} </span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="收件人" align="center" prop="realName" width="150px" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{scope.row.realName}} </span>
|
|
|
- </template>
|
|
|
+ <el-table-column align="center" label="收件人" prop="realName" width="150px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.realName }} </span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="商品" align="center" width="300px" >
|
|
|
<template slot-scope="scope">
|
|
@@ -217,54 +250,65 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column label="订单金额" align="center" prop="totalPrice" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.totalPrice!=null">{{scope.row.totalPrice.toFixed(2)}}</span>
|
|
|
- </template>
|
|
|
+ <el-table-column align="center" label="订单金额" prop="totalPrice">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.totalPrice!=null">{{ scope.row.totalPrice.toFixed(2) }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="应付金额" align="center" prop="payPrice" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.payPrice!=null">{{scope.row.payPrice.toFixed(2)}}</span>
|
|
|
- </template>
|
|
|
+ <el-table-column align="center" label="应付金额" prop="payPrice">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.payPrice!=null">{{ scope.row.payPrice.toFixed(2) }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="下单时间" align="center" prop="createTime" />
|
|
|
+ <el-table-column align="center" label="下单时间" prop="createTime"/>
|
|
|
<!-- <el-table-column label="支付状态" align="center" prop="paid" /> -->
|
|
|
- <el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
|
|
+ <el-table-column align="center" label="支付时间" prop="payTime" width="180">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="支付方式" align="center" prop="payType" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag prop="payType" v-for="(item, index) in payTypeOptions" v-if="scope.row.payType==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
+ <el-table-column align="center" label="支付方式" prop="payType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-for="(item, index) in payTypeOptions" v-if="scope.row.payType==item.dictValue" prop="payType">
|
|
|
+ {{ item.dictLabel }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column label="订单类型" align="center" prop="orderType" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in orderTypeOptions" v-if="scope.row.orderType==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>-->
|
|
|
- <el-table-column label="状态" align="center" prop="status" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
+ <!-- <el-table-column label="订单类型" align="center" prop="orderType" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag prop="status" v-for="(item, index) in orderTypeOptions" v-if="scope.row.orderType==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>-->
|
|
|
+ <el-table-column align="center" label="状态" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue" prop="status">
|
|
|
+ {{ item.dictLabel }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in deliveryStatusOptions" v-if="scope.row.deliveryStatus==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
+ <el-table-column align="center" label="物流状态" prop="deliveryStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-for="(item, index) in deliveryStatusOptions" v-if="scope.row.deliveryStatus==item.dictValue"
|
|
|
+ prop="status"
|
|
|
+ >{{ item.dictLabel }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="物流结算状态" align="center" prop="deliveryPayStatus" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in deliveryPayStatusOptions" v-if="scope.row.deliveryPayStatus==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
+ <el-table-column align="center" label="物流结算状态" prop="deliveryPayStatus">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-for="(item, index) in deliveryPayStatusOptions" v-if="scope.row.deliveryPayStatus==item.dictValue"
|
|
|
+ prop="status"
|
|
|
+ >{{ item.dictLabel }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="操作" fixed="right" width="80px" align="center">
|
|
|
+ <el-table-column align="center" fixed="right" label="操作" width="80px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
+ v-hasPermi="['store:storeOrder:query']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@click="handleDetails(scope.row)"
|
|
|
- v-hasPermi="['store:storeOrder:query']"
|
|
|
- >查看</el-button>
|
|
|
+ >查看
|
|
|
+ </el-button>
|
|
|
<!-- <el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -277,242 +321,316 @@
|
|
|
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
|
- :total="total"
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :total="total"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
<el-drawer
|
|
|
- size="75%"
|
|
|
- :title="show.title" :visible.sync="show.open"
|
|
|
- >
|
|
|
- <product-order ref="order" />
|
|
|
+ :title="show.title"
|
|
|
+ :visible.sync="show.open" size="75%"
|
|
|
+ >
|
|
|
+ <product-order ref="order"/>
|
|
|
</el-drawer>
|
|
|
|
|
|
|
|
|
- <el-dialog :title="title" v-if="open" :visible.sync="open" width="1000px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
- <el-form-item label="会员信息" prop="userId">
|
|
|
- <el-row >
|
|
|
- <el-col >
|
|
|
- <el-input placeholder="请输入会员手机号" style="width:240px;cursor:pointer" v-model="phone">
|
|
|
- </el-input>
|
|
|
- <el-button plain style="margin-left:10px;" @click="searchUser()">查询</el-button>
|
|
|
- <el-button plain style="margin-left:10px;" icon="el-icon-plus" type="primary" @click="handleAddUser()">添加会员</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-table border style="margin-top:5px;" v-loading="userloading" :data="users">
|
|
|
- <el-table-column label="ID" align="center" prop="userId" />
|
|
|
- <el-table-column label="会员头像" align="center" width="80">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-popover
|
|
|
- placement="right"
|
|
|
- title=""
|
|
|
- trigger="hover"
|
|
|
- >
|
|
|
- <img slot="reference" :src="scope.row.avatar" width="50" >
|
|
|
- <img :src="scope.row.avatar" style="max-width: 120px;">
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="昵称" align="center" prop="nickname" />
|
|
|
- <el-table-column label="手机号" align="center" prop="phone" />
|
|
|
- <el-table-column label="状态" align="center" prop="status" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in userStatusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="收货信息" prop="addressId">
|
|
|
- <el-row >
|
|
|
- <el-col >
|
|
|
- <el-button plain type="primary" icon="el-icon-plus" @click="handleAddUserAddress()">添加收货地址</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-radio-group v-model="form.addressId" style="width:100%">
|
|
|
- <el-table border style="margin-top:5px;" v-loading="addressloading" :data="address">
|
|
|
- <el-table-column label="ID" align="center" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-radio :label="scope.row.id"></el-radio>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="收货人姓名" align="center" prop="realName" />
|
|
|
- <el-table-column label="收货人电话" align="center" prop="phone" />
|
|
|
- <el-table-column label="地址" align="center" prop="detail" >
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.province}} {{scope.row.city}} {{scope.row.district}} {{scope.row.detail}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="商品列表" >
|
|
|
- <el-row >
|
|
|
- <el-col >
|
|
|
- <el-button plain type="primary" icon="el-icon-plus" @click="handleAddProduct">添加商品</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-table border :key = "tablekey" width="100%" style="margin-top:5px;" :data="products">
|
|
|
- <el-table-column label="商品编号" align="center" prop="barCode" />
|
|
|
- <el-table-column label="商品图片" align="center" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-popover
|
|
|
- placement="right"
|
|
|
- title=""
|
|
|
- trigger="hover"
|
|
|
- >
|
|
|
- <img slot="reference" :src="scope.row.image" width="50">
|
|
|
- <img :src="scope.row.image" style="max-width: 50px;">
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="商品名称" show-overflow-tooltip align="center" prop="productName" />
|
|
|
- <el-table-column label="商品规格" align="center" prop="sku" />
|
|
|
- <el-table-column label="库存" align="center" prop="stock" />
|
|
|
- <el-table-column label="单价" align="center" prop="price" />
|
|
|
- <el-table-column label="数量" align="center" prop="count" width="200px" :key="tablekey">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <el-input-number v-model="scope.row.count" @change="handleProductCountChange(scope.row)" size="mini" :min="1" :max="scope.row.stock" ></el-input-number>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="小计" align="center" prop="money" />
|
|
|
- <el-table-column label="操作" align="center" width="100px" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- >删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-row>
|
|
|
- <el-col>
|
|
|
- <span>商品合计:{{products.length}}</span><span style="margin-left:10px;">商品总价:{{totalMoney.toFixed(2)}}</span>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="订单备注" prop="mark">
|
|
|
- <el-input type="textarea" rows="2" v-model="form.mark" placeholder="" />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <el-dialog v-if="open" :title="title" :visible.sync="open" append-to-body width="1000px">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-form-item label="会员信息" prop="userId">
|
|
|
+ <el-row>
|
|
|
+ <el-col>
|
|
|
+ <el-input v-model="phone" placeholder="请输入会员手机号" style="width:240px;cursor:pointer">
|
|
|
+ </el-input>
|
|
|
+ <el-button plain style="margin-left:10px;" @click="searchUser()">查询</el-button>
|
|
|
+ <el-button icon="el-icon-plus" plain style="margin-left:10px;" type="primary" @click="handleAddUser()">
|
|
|
+ 添加会员
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-table v-loading="userloading" :data="users" border style="margin-top:5px;">
|
|
|
+ <el-table-column align="center" label="ID" prop="userId"/>
|
|
|
+ <el-table-column align="center" label="会员头像" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover
|
|
|
+ placement="right"
|
|
|
+ title=""
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <img slot="reference" :src="scope.row.avatar" width="50">
|
|
|
+ <img :src="scope.row.avatar" style="max-width: 120px;">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="昵称" prop="nickname"/>
|
|
|
+ <el-table-column align="center" label="手机号" prop="phone"/>
|
|
|
+ <el-table-column align="center" label="状态" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-for="(item, index) in userStatusOptions" v-if="scope.row.status==item.dictValue"
|
|
|
+ prop="status"
|
|
|
+ >{{ item.dictLabel }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="收货信息" prop="addressId">
|
|
|
+ <el-row>
|
|
|
+ <el-col>
|
|
|
+ <el-button icon="el-icon-plus" plain type="primary" @click="handleAddUserAddress()">添加收货地址
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-radio-group v-model="form.addressId" style="width:100%">
|
|
|
+ <el-table v-loading="addressloading" :data="address" border style="margin-top:5px;">
|
|
|
+ <el-table-column align="center" label="ID">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-radio :label="scope.row.id"></el-radio>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="收货人姓名" prop="realName"/>
|
|
|
+ <el-table-column align="center" label="收货人电话" prop="phone"/>
|
|
|
+ <el-table-column align="center" label="地址" prop="detail">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.province }} {{ scope.row.city }} {{ scope.row.district }} {{ scope.row.detail }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="商品列表">
|
|
|
+ <el-row>
|
|
|
+ <el-col>
|
|
|
+ <el-button icon="el-icon-plus" plain type="primary" @click="handleAddProduct">添加商品</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-table :key="tablekey" :data="products" border style="margin-top:5px;" width="100%">
|
|
|
+ <el-table-column align="center" label="商品编号" prop="barCode"/>
|
|
|
+ <el-table-column align="center" label="商品图片" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover
|
|
|
+ placement="right"
|
|
|
+ title=""
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <img slot="reference" :src="scope.row.image" width="50">
|
|
|
+ <img :src="scope.row.image" style="max-width: 50px;">
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="商品名称" prop="productName" show-overflow-tooltip/>
|
|
|
+ <el-table-column align="center" label="商品规格" prop="sku"/>
|
|
|
+ <el-table-column align="center" label="库存" prop="stock"/>
|
|
|
+ <el-table-column align="center" label="单价" prop="price"/>
|
|
|
+ <el-table-column :key="tablekey" align="center" label="数量" prop="count" width="200px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-input-number v-model="scope.row.count" :max="scope.row.stock" :min="1"
|
|
|
+ size="mini" @change="handleProductCountChange(scope.row)"
|
|
|
+ ></el-input-number>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="小计" prop="money"/>
|
|
|
+ <el-table-column align="center" label="操作" width="100px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-row>
|
|
|
+ <el-col>
|
|
|
+ <span>商品合计:{{ products.length }}</span><span style="margin-left:10px;"
|
|
|
+ >商品总价:{{ totalMoney.toFixed(2) }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="订单备注" prop="mark">
|
|
|
+ <el-input v-model="form.mark" placeholder="" rows="2" type="textarea"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="product.title" v-if="product.open" :visible.sync="product.open" width="1000px" append-to-body>
|
|
|
- <product-select @selectProduct="selectProduct" />
|
|
|
+ <el-dialog v-if="product.open" :title="product.title" :visible.sync="product.open" append-to-body width="1000px">
|
|
|
+ <product-select @selectProduct="selectProduct"/>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="user.title" v-if="user.open" :visible.sync="user.open" width="500px" append-to-body>
|
|
|
- <add-user @addUser="addUser" />
|
|
|
+ <el-dialog v-if="user.open" :title="user.title" :visible.sync="user.open" append-to-body width="500px">
|
|
|
+ <add-user @addUser="addUser"/>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="userAddress.title" v-if="userAddress.open" :visible.sync="userAddress.open" width="800px" append-to-body>
|
|
|
- <add-user-address ref="addUserAddress" @addUserAddress="addUserAddress" />
|
|
|
+ <el-dialog v-if="userAddress.open" :title="userAddress.title" :visible.sync="userAddress.open" append-to-body
|
|
|
+ width="800px"
|
|
|
+ >
|
|
|
+ <add-user-address ref="addUserAddress" @addUserAddress="addUserAddress"/>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="payQr.title" v-if="payQr.open" :visible.sync="payQr.open" width="240px" append-to-body>
|
|
|
- <div style="padding-bottom:15px;" >
|
|
|
- <div class="qrcode" ref="qrCodeUrl"></div>
|
|
|
- </div>
|
|
|
+ <el-dialog v-if="payQr.open" :title="payQr.title" :visible.sync="payQr.open" append-to-body width="240px">
|
|
|
+ <div style="padding-bottom:15px;">
|
|
|
+ <div ref="qrCodeUrl" class="qrcode"></div>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
|
- <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
|
|
+ <el-dialog :title="upload.title" :visible.sync="upload.open" append-to-body width="400px">
|
|
|
+ <el-upload ref="upload" :action="upload.url + '?updateSupport=' + upload.updateSupport" :auto-upload="false" :disabled="upload.isUploading"
|
|
|
+ :headers="upload.headers" :limit="1"
|
|
|
+ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" accept=".xlsx, .xls" drag
|
|
|
+ >
|
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">
|
|
|
将文件拖到此处,或
|
|
|
<em>点击上传</em>
|
|
|
</div>
|
|
|
- <div class="el-upload__tip" slot="tip">
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
<!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的数据 -->
|
|
|
- <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
|
|
|
+ <el-link style="font-size:12px" type="info" @click="importTemplate">下载模板</el-link>
|
|
|
</div>
|
|
|
- <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
|
|
+ <div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
|
|
</el-upload>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
<el-button @click="upload.open = false">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog title="导入结果" :close-on-press-escape="false" :close-on-click-modal="false" :visible.sync="importMsgOpen" width="500px" append-to-body>
|
|
|
- <div class="import-msg" v-html="importMsg">
|
|
|
- </div>
|
|
|
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="importMsgOpen"
|
|
|
+ append-to-body title="导入结果" width="500px"
|
|
|
+ >
|
|
|
+ <h1>{{importMsg}}</h1>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 批量发货 -->
|
|
|
+ <el-dialog
|
|
|
+ :before-close="handleClose"
|
|
|
+ :visible.sync="deliveryNoteOpen"
|
|
|
+ center
|
|
|
+ title="批量发货"
|
|
|
+ width="35%"
|
|
|
+ >
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <!-- 小程序Appid选择 -->
|
|
|
+<!-- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">-->
|
|
|
+<!-- <el-form-item label="小程序:" prop="miniAppId">-->
|
|
|
+<!-- <el-select-->
|
|
|
+<!-- v-model="ruleForm.miniAppId"-->
|
|
|
+<!-- clearable-->
|
|
|
+<!-- placeholder="请选择发货小程序"-->
|
|
|
+<!-- style="width: 100%"-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <el-option-->
|
|
|
+<!-- v-for="item in miniAppList"-->
|
|
|
+<!-- :key="item.appId"-->
|
|
|
+<!-- :label="item.appName"-->
|
|
|
+<!-- :value="item.appId"-->
|
|
|
+<!-- />-->
|
|
|
+<!-- </el-select>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- </el-form>-->
|
|
|
+
|
|
|
+ <el-upload ref="upload" :action="orderUpload.url" :auto-upload="false" :disabled="orderUpload.isUploading" :headers="orderUpload.headers"
|
|
|
+ :limit="1" :on-progress="handleFileUploadProgress"
|
|
|
+ :on-success="handleFileSuccess" accept=".xlsx, .xls" drag
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ 将文件拖到此处,或
|
|
|
+ <em>点击上传</em>
|
|
|
+ </div>
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
+ <el-link style="font-size:12px" type="info" @click="importDeliveryNoteTemplate">下载模板</el-link>
|
|
|
+ </div>
|
|
|
+ <div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
|
|
+ </el-upload>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-button @click="deliveryNoteOpen = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitDeliveryNote">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { importTemplate,exportHealthStoreOrderItems,createUserOrder,listHealthStoreOrder, getStoreOrder, delStoreOrder, addStoreOrder, updateStoreOrder, exportHealthStoreOrder } from "@/api/hisStore/storeOrder";
|
|
|
-import { getUserList } from "@/api/hisStore/user";
|
|
|
-import { getAddressList } from "@/api/hisStore/userAddress";
|
|
|
-import productOrder from "../components/productOrder";
|
|
|
-import productSelect from "../components/productSelect";
|
|
|
-import addUser from "../components/addUser";
|
|
|
-import addUserAddress from "../components/addUserAddress";
|
|
|
-import { getToken } from "@/utils/auth";
|
|
|
+import {
|
|
|
+ importDeliveryNoteExpressTemplate,
|
|
|
+ importTemplate,
|
|
|
+ exportHealthStoreOrderItems,
|
|
|
+ createUserOrder,
|
|
|
+ listHealthStoreOrder,
|
|
|
+ getStoreOrder,
|
|
|
+ delStoreOrder,
|
|
|
+ addStoreOrder,
|
|
|
+ updateStoreOrder,
|
|
|
+ exportHealthStoreOrder
|
|
|
+} from '@/api/hisStore/storeOrder'
|
|
|
+import { getUserList } from '@/api/hisStore/user'
|
|
|
+import { getAddressList } from '@/api/hisStore/userAddress'
|
|
|
+import productOrder from '../components/productOrder'
|
|
|
+import productSelect from '../components/productSelect'
|
|
|
+import addUser from '../components/addUser'
|
|
|
+import addUserAddress from '../components/addUserAddress'
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
import QRCode from 'qrcodejs2'
|
|
|
-import { getCompanyList } from "@/api/company/company";
|
|
|
+import { getCompanyList } from '@/api/company/company'
|
|
|
|
|
|
-import { treeselect } from "@/api/company/companyDept";
|
|
|
-import Treeselect from "@riophae/vue-treeselect";
|
|
|
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+import { treeselect } from '@/api/company/companyDept'
|
|
|
+import Treeselect from '@riophae/vue-treeselect'
|
|
|
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
+import { getConfigByKey } from '@/api/system/config'
|
|
|
|
|
|
export default {
|
|
|
- components: { productOrder,productSelect,addUser,addUserAddress,Treeselect },
|
|
|
- name: "HisHealthStoreOrderList",
|
|
|
+ components: { productOrder, productSelect, addUser, addUserAddress, Treeselect },
|
|
|
+ name: 'HisHealthStoreOrderList',
|
|
|
watch: {
|
|
|
// 监听deptId
|
|
|
'deptId': 'currDeptChange'
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- importMsgOpen:false,
|
|
|
- importMsg:"",
|
|
|
- deliveryPayStatusOptions:[],
|
|
|
- deliveryStatusOptions:[],
|
|
|
- companys:[],
|
|
|
- deptOptions:[],
|
|
|
- companyId:undefined,
|
|
|
- deptId:undefined,
|
|
|
- orderTypeOptions:[],
|
|
|
- payTypeOptions:[],
|
|
|
- payQr:{
|
|
|
- open:false,
|
|
|
- title:"付款二维码"
|
|
|
+ importMsgOpen: false,
|
|
|
+ importMsg: '',
|
|
|
+ deliveryPayStatusOptions: [],
|
|
|
+ deliveryStatusOptions: [],
|
|
|
+ companys: [],
|
|
|
+ deptOptions: [],
|
|
|
+ companyId: undefined,
|
|
|
+ deptId: undefined,
|
|
|
+ orderTypeOptions: [],
|
|
|
+ payTypeOptions: [],
|
|
|
+ payQr: {
|
|
|
+ open: false,
|
|
|
+ title: '付款二维码'
|
|
|
},
|
|
|
- user:{
|
|
|
- open:false,
|
|
|
- title:"创建会员"
|
|
|
+ user: {
|
|
|
+ open: false,
|
|
|
+ title: '创建会员'
|
|
|
},
|
|
|
- userAddress:{
|
|
|
- open:false,
|
|
|
- title:"创建收货地址"
|
|
|
+ userAddress: {
|
|
|
+ open: false,
|
|
|
+ title: '创建收货地址'
|
|
|
},
|
|
|
- tablekey:false,
|
|
|
- totalMoney:0.00,
|
|
|
- products:[],
|
|
|
- product:{
|
|
|
- open:false,
|
|
|
- title:"商品选择"
|
|
|
+ tablekey: false,
|
|
|
+ totalMoney: 0.00,
|
|
|
+ products: [],
|
|
|
+ product: {
|
|
|
+ open: false,
|
|
|
+ title: '商品选择'
|
|
|
},
|
|
|
- userStatusOptions:[],
|
|
|
- phone:null,
|
|
|
- address:[],
|
|
|
+ userStatusOptions: [],
|
|
|
+ phone: null,
|
|
|
+ address: [],
|
|
|
addressloading: false,
|
|
|
userloading: false,
|
|
|
- users:[],
|
|
|
- userStatusOptions:[],
|
|
|
- show:{
|
|
|
- open:false,
|
|
|
- title:"订单详情"
|
|
|
+ users: [],
|
|
|
+ show: {
|
|
|
+ open: false,
|
|
|
+ title: '订单详情'
|
|
|
},
|
|
|
- activeName:"00",
|
|
|
- statusOptions:[],
|
|
|
+ activeName: '00',
|
|
|
+ statusOptions: [],
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -528,13 +646,13 @@ export default {
|
|
|
// 订单表格数据
|
|
|
storeOrderList: [],
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
- createTimeRange:[],
|
|
|
- payTimeRange:[],
|
|
|
- deliveryImportTimeRange:[],
|
|
|
- deliverySendTimeRange:[],
|
|
|
+ createTimeRange: [],
|
|
|
+ payTimeRange: [],
|
|
|
+ deliveryImportTimeRange: [],
|
|
|
+ deliverySendTimeRange: [],
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
@@ -583,451 +701,527 @@ export default {
|
|
|
isChannel: null,
|
|
|
isRemind: null,
|
|
|
isSysDel: null,
|
|
|
- deptId:null,
|
|
|
+ deptId: null
|
|
|
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {
|
|
|
- addressId:null,
|
|
|
- userId:null,
|
|
|
+ addressId: null,
|
|
|
+ userId: null
|
|
|
},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
userId: [
|
|
|
- { required: true, message: "会员信息不能为空" }
|
|
|
+ { required: true, message: '会员信息不能为空' }
|
|
|
],
|
|
|
addressId: [
|
|
|
- { required: true, message: "收货信息不能为空" }
|
|
|
+ { required: true, message: '收货信息不能为空' }
|
|
|
+ ],
|
|
|
+ miniAppId: [
|
|
|
+ { required: true, message: '发货小程序不能为空' }
|
|
|
],
|
|
|
-
|
|
|
},
|
|
|
upload: {
|
|
|
// 是否显示弹出层(用户导入)
|
|
|
open: false,
|
|
|
// 弹出层标题(用户导入)
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 0,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: 'Bearer ' + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + '/store/storeOrder/importExpress'
|
|
|
+ },
|
|
|
+ orderUpload: {
|
|
|
+ // 是否显示弹出层(用户导入)
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题(用户导入)
|
|
|
+ title: '',
|
|
|
// 是否禁用上传
|
|
|
isUploading: false,
|
|
|
// 是否更新已经存在的用户数据
|
|
|
updateSupport: 0,
|
|
|
// 设置上传的请求头部
|
|
|
- headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ headers: { Authorization: 'Bearer ' + getToken() },
|
|
|
// 上传的地址
|
|
|
- url: process.env.VUE_APP_BASE_API + "/store/storeOrder/importExpress",
|
|
|
+ url: process.env.VUE_APP_BASE_API + '/store/store/storeOrder/importDeliveryNoteExpress',
|
|
|
},
|
|
|
- };
|
|
|
+ deliveryNoteOpen: false,
|
|
|
+ miniAppList: [],
|
|
|
+ ruleForm:{
|
|
|
+ miniAppId: null,
|
|
|
+ },
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
getCompanyList().then(response => {
|
|
|
- this.companys = response.data;
|
|
|
- if(this.companys!=null&&this.companys.length>0){
|
|
|
- this.companyId=this.companys[0].companyId;
|
|
|
- this.getTreeselect();
|
|
|
- }
|
|
|
- });
|
|
|
- this.getDicts("store_order_type").then((response) => {
|
|
|
- this.orderTypeOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("user_status").then((response) => {
|
|
|
- this.userStatusOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("store_pay_type").then((response) => {
|
|
|
- this.payTypeOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("store_order_status").then((response) => {
|
|
|
- this.statusOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("store_order_delivery_status").then((response) => {
|
|
|
- this.deliveryStatusOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("store_delivery_pay_status").then((response) => {
|
|
|
- this.deliveryPayStatusOptions = response.data;
|
|
|
- });
|
|
|
+ this.companys = response.data
|
|
|
+ if (this.companys != null && this.companys.length > 0) {
|
|
|
+ this.companyId = this.companys[0].companyId
|
|
|
+ this.getTreeselect()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.getDicts('store_order_type').then((response) => {
|
|
|
+ this.orderTypeOptions = response.data
|
|
|
+ })
|
|
|
+ this.getDicts('user_status').then((response) => {
|
|
|
+ this.userStatusOptions = response.data
|
|
|
+ })
|
|
|
+ this.getDicts('store_pay_type').then((response) => {
|
|
|
+ this.payTypeOptions = response.data
|
|
|
+ })
|
|
|
+ this.getDicts('store_order_status').then((response) => {
|
|
|
+ this.statusOptions = response.data
|
|
|
+ })
|
|
|
+ this.getDicts('store_order_delivery_status').then((response) => {
|
|
|
+ this.deliveryStatusOptions = response.data
|
|
|
+ })
|
|
|
+ this.getDicts('store_delivery_pay_status').then((response) => {
|
|
|
+ this.deliveryPayStatusOptions = response.data
|
|
|
+ })
|
|
|
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
- handleGenPayUrl(row){
|
|
|
- this.payQr.open=true;
|
|
|
+ handleGenPayUrl(row) {
|
|
|
+ this.payQr.open = true
|
|
|
setTimeout(() => {
|
|
|
var qrcode = new QRCode(this.$refs.qrCodeUrl, {
|
|
|
- text: config.payQRUrl+row.id, // 需要转换为二维码的内容
|
|
|
- width: 200,
|
|
|
- height: 200,
|
|
|
- colorDark: '#000000',
|
|
|
- colorLight: '#ffffff',
|
|
|
- correctLevel: QRCode.CorrectLevel.H
|
|
|
+ text: config.payQRUrl + row.id, // 需要转换为二维码的内容
|
|
|
+ width: 200,
|
|
|
+ height: 200,
|
|
|
+ colorDark: '#000000',
|
|
|
+ colorLight: '#ffffff',
|
|
|
+ correctLevel: QRCode.CorrectLevel.H
|
|
|
})
|
|
|
- }, 200);
|
|
|
+ }, 200)
|
|
|
},
|
|
|
- handleAddUser(){
|
|
|
- this.user.open=true;
|
|
|
+ handleAddUser() {
|
|
|
+ this.user.open = true
|
|
|
},
|
|
|
- handleAddUserAddress(){
|
|
|
- if(this.form.userId==null){
|
|
|
- this.msgError("请选择会员");
|
|
|
- return;
|
|
|
+ handleAddUserAddress() {
|
|
|
+ if (this.form.userId == null) {
|
|
|
+ this.msgError('请选择会员')
|
|
|
+ return
|
|
|
}
|
|
|
- this.userAddress.open=true;
|
|
|
+ this.userAddress.open = true
|
|
|
setTimeout(() => {
|
|
|
- this.$refs.addUserAddress.init(this.form.userId);
|
|
|
- }, 500);
|
|
|
+ this.$refs.addUserAddress.init(this.form.userId)
|
|
|
+ }, 500)
|
|
|
},
|
|
|
- addUser(){
|
|
|
- this.user.open=false;
|
|
|
+ addUser() {
|
|
|
+ this.user.open = false
|
|
|
},
|
|
|
- addUserAddress(){
|
|
|
- this.userAddress.open=false;
|
|
|
+ addUserAddress() {
|
|
|
+ this.userAddress.open = false
|
|
|
//获取地址
|
|
|
- this.getAddressList(this.form.userId);
|
|
|
+ this.getAddressList(this.form.userId)
|
|
|
},
|
|
|
- compute(){
|
|
|
- this.totalMoney=0;
|
|
|
- var that=this;
|
|
|
- this.products.forEach (function (value) {
|
|
|
- that.totalMoney += value.money;
|
|
|
- });
|
|
|
+ compute() {
|
|
|
+ this.totalMoney = 0
|
|
|
+ var that = this
|
|
|
+ this.products.forEach(function(value) {
|
|
|
+ that.totalMoney += value.money
|
|
|
+ })
|
|
|
console.log(that.totalMoney)
|
|
|
},
|
|
|
- handleProductCountChange(row){
|
|
|
+ handleProductCountChange(row) {
|
|
|
this.tablekey = !this.tablekey
|
|
|
console.log(row)
|
|
|
- row.money=row.count*row.price;
|
|
|
- this.$forceUpdate();
|
|
|
- this.compute();
|
|
|
+ row.money = row.count * row.price
|
|
|
+ this.$forceUpdate()
|
|
|
+ this.compute()
|
|
|
},
|
|
|
- selectProduct(row){
|
|
|
- console.log(row);
|
|
|
- for(var i=0;i<this.products.length;i++){
|
|
|
- if(this.products[i].id==row.id){
|
|
|
- return;
|
|
|
+ selectProduct(row) {
|
|
|
+ console.log(row)
|
|
|
+ for (var i = 0; i < this.products.length; i++) {
|
|
|
+ if (this.products[i].id == row.id) {
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
- row.count=1;
|
|
|
- row.money=row.count*row.price;
|
|
|
- this.products.push(row);
|
|
|
- this.compute();
|
|
|
+ row.count = 1
|
|
|
+ row.money = row.count * row.price
|
|
|
+ this.products.push(row)
|
|
|
+ this.compute()
|
|
|
},
|
|
|
- handleAddProduct(){
|
|
|
- this.product.open=true;
|
|
|
+ handleAddProduct() {
|
|
|
+ this.product.open = true
|
|
|
},
|
|
|
- searchUser(){
|
|
|
- if(this.phone==null||this.phone==""){
|
|
|
- return;
|
|
|
+ searchUser() {
|
|
|
+ if (this.phone == null || this.phone == '') {
|
|
|
+ return
|
|
|
}
|
|
|
- var data={phone:this.phone}
|
|
|
- this.userloading = true;
|
|
|
- this.users=[];
|
|
|
- this.address=[];
|
|
|
+ var data = { phone: this.phone }
|
|
|
+ this.userloading = true
|
|
|
+ this.users = []
|
|
|
+ this.address = []
|
|
|
getUserList(data).then(response => {
|
|
|
- this.users = response.data;
|
|
|
- this.userloading = false;
|
|
|
- if(this.users!=null&&this.users.length==1){
|
|
|
- this.form.userId=this.users[0].userId;
|
|
|
+ this.users = response.data
|
|
|
+ this.userloading = false
|
|
|
+ if (this.users != null && this.users.length == 1) {
|
|
|
+ this.form.userId = this.users[0].userId
|
|
|
this.getAddressList(this.form.userId)
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
- getAddressList(userId){
|
|
|
- var data={userId:userId}
|
|
|
- this.addressloading = true;
|
|
|
- this.address=[];
|
|
|
+ getAddressList(userId) {
|
|
|
+ var data = { userId: userId }
|
|
|
+ this.addressloading = true
|
|
|
+ this.address = []
|
|
|
getAddressList(data).then(response => {
|
|
|
- this.address = response.data;
|
|
|
- this.addressloading = false;
|
|
|
- });
|
|
|
+ this.address = response.data
|
|
|
+ this.addressloading = false
|
|
|
+ })
|
|
|
},
|
|
|
- handleDetails(row){
|
|
|
- this.show.open=true;
|
|
|
- const orderId = row.id ;
|
|
|
+ handleDetails(row) {
|
|
|
+ this.show.open = true
|
|
|
+ const orderId = row.id
|
|
|
setTimeout(() => {
|
|
|
- this.$refs.order.getOrder(orderId);
|
|
|
- }, 500);
|
|
|
+ this.$refs.order.getOrder(orderId)
|
|
|
+ }, 500)
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
|
- this.activeName=tab.name;
|
|
|
- this.queryParams.status=tab.name
|
|
|
+ this.activeName = tab.name
|
|
|
+ this.queryParams.status = tab.name
|
|
|
console.log(this.queryParams.status)
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 查询订单列表 */
|
|
|
getList() {
|
|
|
- this.loading = true;
|
|
|
- if(this.queryParams.status=='00'){
|
|
|
- this.queryParams.status=null;
|
|
|
+ this.loading = true
|
|
|
+ if (this.queryParams.status == '00') {
|
|
|
+ this.queryParams.status = null
|
|
|
}
|
|
|
|
|
|
- if(this.createTimeRange!=null&&this.createTimeRange.length==2){
|
|
|
- this.queryParams.createTimeRange=this.createTimeRange[0]+"--"+this.createTimeRange[1]
|
|
|
- }
|
|
|
- else{
|
|
|
- this.queryParams.createTimeRange=null;
|
|
|
+ if (this.createTimeRange != null && this.createTimeRange.length == 2) {
|
|
|
+ this.queryParams.createTimeRange = this.createTimeRange[0] + '--' + this.createTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.createTimeRange = null
|
|
|
}
|
|
|
|
|
|
- if(this.payTimeRange!=null&&this.payTimeRange.length==2){
|
|
|
- this.queryParams.payTimeRange=this.payTimeRange[0]+"--"+this.payTimeRange[1]
|
|
|
- }
|
|
|
- else{
|
|
|
- this.queryParams.payTimeRange=null;
|
|
|
- }
|
|
|
- if(this.deliveryImportTimeRange!=null&&this.deliveryImportTimeRange.length==2){
|
|
|
- this.queryParams.deliveryImportTimeRange=this.deliveryImportTimeRange[0]+"--"+this.deliveryImportTimeRange[1]
|
|
|
+ if (this.payTimeRange != null && this.payTimeRange.length == 2) {
|
|
|
+ this.queryParams.payTimeRange = this.payTimeRange[0] + '--' + this.payTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.payTimeRange = null
|
|
|
}
|
|
|
- else{
|
|
|
- this.queryParams.deliveryImportTimeRange=null;
|
|
|
+ if (this.deliveryImportTimeRange != null && this.deliveryImportTimeRange.length == 2) {
|
|
|
+ this.queryParams.deliveryImportTimeRange = this.deliveryImportTimeRange[0] + '--' + this.deliveryImportTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.deliveryImportTimeRange = null
|
|
|
}
|
|
|
- if(this.deliverySendTimeRange!=null&&this.deliverySendTimeRange.length==2){
|
|
|
- this.queryParams.deliverySendTimeRange=this.deliverySendTimeRange[0]+"--"+this.deliverySendTimeRange[1]
|
|
|
- }
|
|
|
- else{
|
|
|
- this.queryParams.deliverySendTimeRange=null;
|
|
|
+ if (this.deliverySendTimeRange != null && this.deliverySendTimeRange.length == 2) {
|
|
|
+ this.queryParams.deliverySendTimeRange = this.deliverySendTimeRange[0] + '--' + this.deliverySendTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.deliverySendTimeRange = null
|
|
|
}
|
|
|
|
|
|
listHealthStoreOrder(this.queryParams).then(response => {
|
|
|
- this.storeOrderList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.storeOrderList = response.rows
|
|
|
+ this.total = response.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
+ this.open = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
- addressId:null,
|
|
|
- userId:null,
|
|
|
+ addressId: null,
|
|
|
+ userId: null
|
|
|
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
+ }
|
|
|
+ this.resetForm('form')
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.reset();
|
|
|
- this.open = true;
|
|
|
- this.title = "创建订单";
|
|
|
+ this.reset()
|
|
|
+ this.open = true
|
|
|
+ this.title = '创建订单'
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
+ this.reset()
|
|
|
const id = row.id || this.ids
|
|
|
getStoreOrder(id).then(response => {
|
|
|
- this.form = response.data;
|
|
|
- this.open = true;
|
|
|
- this.title = "修改订单";
|
|
|
- });
|
|
|
+ this.form = response.data
|
|
|
+ this.open = true
|
|
|
+ this.title = '修改订单'
|
|
|
+ })
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
- this.form.products=this.products;
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
|
+ this.form.products = this.products
|
|
|
if (valid) {
|
|
|
- console.log(this.form);
|
|
|
+ console.log(this.form)
|
|
|
createUserOrder(this.form).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
- this.msgSuccess("创建成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
+ this.msgSuccess('创建成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleOrderDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$confirm('是否确认删除当前选择的订单数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delStoreOrder(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- this.products.splice(this.products.findIndex(item => item.id === row.id), 1)
|
|
|
- this.compute();
|
|
|
+ this.products.splice(this.products.findIndex(item => item.id === row.id), 1)
|
|
|
+ this.compute()
|
|
|
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- if(this.queryParams.status=='00'){
|
|
|
- this.queryParams.status=null;
|
|
|
- }
|
|
|
- if(this.createTimeRange!=null&&this.createTimeRange.length==2){
|
|
|
- this.queryParams.createTimeRange=this.createTimeRange[0]+"--"+this.createTimeRange[1]
|
|
|
- }
|
|
|
- else{
|
|
|
- this.queryParams.createTimeRange=null;
|
|
|
+ if (this.queryParams.status == '00') {
|
|
|
+ this.queryParams.status = null
|
|
|
}
|
|
|
- if(this.payTimeRange!=null&&this.payTimeRange.length==2){
|
|
|
- this.queryParams.payTimeRange=this.payTimeRange[0]+"--"+this.payTimeRange[1]
|
|
|
+ if (this.createTimeRange != null && this.createTimeRange.length == 2) {
|
|
|
+ this.queryParams.createTimeRange = this.createTimeRange[0] + '--' + this.createTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.createTimeRange = null
|
|
|
}
|
|
|
- else{
|
|
|
- this.queryParams.payTimeRange=null;
|
|
|
+ if (this.payTimeRange != null && this.payTimeRange.length == 2) {
|
|
|
+ this.queryParams.payTimeRange = this.payTimeRange[0] + '--' + this.payTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.payTimeRange = null
|
|
|
}
|
|
|
- if(this.deliveryImportTimeRange!=null&&this.deliveryImportTimeRange.length==2){
|
|
|
- this.queryParams.deliveryImportTimeRange=this.deliveryImportTimeRange[0]+"--"+this.deliveryImportTimeRange[1]
|
|
|
+ if (this.deliveryImportTimeRange != null && this.deliveryImportTimeRange.length == 2) {
|
|
|
+ this.queryParams.deliveryImportTimeRange = this.deliveryImportTimeRange[0] + '--' + this.deliveryImportTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.deliveryImportTimeRange = null
|
|
|
}
|
|
|
- else{
|
|
|
- this.queryParams.deliveryImportTimeRange=null;
|
|
|
+ if (this.deliverySendTimeRange != null && this.deliverySendTimeRange.length == 2) {
|
|
|
+ this.queryParams.deliverySendTimeRange = this.deliverySendTimeRange[0] + '--' + this.deliverySendTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.deliverySendTimeRange = null
|
|
|
}
|
|
|
- if(this.deliverySendTimeRange!=null&&this.deliverySendTimeRange.length==2){
|
|
|
- this.queryParams.deliverySendTimeRange=this.deliverySendTimeRange[0]+"--"+this.deliverySendTimeRange[1]
|
|
|
- }
|
|
|
- else{
|
|
|
- this.queryParams.deliverySendTimeRange=null;
|
|
|
- }
|
|
|
- const queryParams = this.addDateRange(this.queryParams, this.dateRange);
|
|
|
- this.$confirm('是否确认导出所有订单数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportHealthStoreOrder(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- }).catch(function() {});
|
|
|
+ const queryParams = this.addDateRange(this.queryParams, this.dateRange)
|
|
|
+ this.$confirm('是否确认导出所有订单数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ return exportHealthStoreOrder(queryParams)
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg)
|
|
|
+ }).catch(function() {
|
|
|
+ })
|
|
|
},
|
|
|
handleExportItems() {
|
|
|
- if(this.queryParams.status=='00'){
|
|
|
- this.queryParams.status=null;
|
|
|
- }
|
|
|
- if(this.createTimeRange!=null&&this.createTimeRange.length==2){
|
|
|
- this.queryParams.createTimeRange=this.createTimeRange[0]+"--"+this.createTimeRange[1]
|
|
|
- }
|
|
|
- else{
|
|
|
- this.queryParams.createTimeRange=null;
|
|
|
- }
|
|
|
- if(this.payTimeRange!=null&&this.payTimeRange.length==2){
|
|
|
- this.queryParams.payTimeRange=this.payTimeRange[0]+"--"+this.payTimeRange[1]
|
|
|
+ if (this.queryParams.status == '00') {
|
|
|
+ this.queryParams.status = null
|
|
|
}
|
|
|
- else{
|
|
|
- this.queryParams.payTimeRange=null;
|
|
|
+ if (this.createTimeRange != null && this.createTimeRange.length == 2) {
|
|
|
+ this.queryParams.createTimeRange = this.createTimeRange[0] + '--' + this.createTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.createTimeRange = null
|
|
|
}
|
|
|
- if(this.deliveryImportTimeRange!=null&&this.deliveryImportTimeRange.length==2){
|
|
|
- this.queryParams.deliveryImportTimeRange=this.deliveryImportTimeRange[0]+"--"+this.deliveryImportTimeRange[1]
|
|
|
+ if (this.payTimeRange != null && this.payTimeRange.length == 2) {
|
|
|
+ this.queryParams.payTimeRange = this.payTimeRange[0] + '--' + this.payTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.payTimeRange = null
|
|
|
}
|
|
|
- else{
|
|
|
- this.queryParams.deliveryImportTimeRange=null;
|
|
|
+ if (this.deliveryImportTimeRange != null && this.deliveryImportTimeRange.length == 2) {
|
|
|
+ this.queryParams.deliveryImportTimeRange = this.deliveryImportTimeRange[0] + '--' + this.deliveryImportTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.deliveryImportTimeRange = null
|
|
|
}
|
|
|
- if(this.deliverySendTimeRange!=null&&this.deliverySendTimeRange.length==2){
|
|
|
- this.queryParams.deliverySendTimeRange=this.deliverySendTimeRange[0]+"--"+this.deliverySendTimeRange[1]
|
|
|
+ if (this.deliverySendTimeRange != null && this.deliverySendTimeRange.length == 2) {
|
|
|
+ this.queryParams.deliverySendTimeRange = this.deliverySendTimeRange[0] + '--' + this.deliverySendTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.deliverySendTimeRange = null
|
|
|
}
|
|
|
- else{
|
|
|
- this.queryParams.deliverySendTimeRange=null;
|
|
|
- }
|
|
|
- const queryParams = this.addDateRange(this.queryParams, this.dateRange);
|
|
|
- this.$confirm('是否确认导出所有订单明细数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportHealthStoreOrderItems(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- }).catch(function() {});
|
|
|
+ const queryParams = this.addDateRange(this.queryParams, this.dateRange)
|
|
|
+ this.$confirm('是否确认导出所有订单明细数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ return exportHealthStoreOrderItems(queryParams)
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg)
|
|
|
+ }).catch(function() {
|
|
|
+ })
|
|
|
},
|
|
|
handleImport() {
|
|
|
- this.upload.title = "导入银行回单";
|
|
|
- this.upload.open = true;
|
|
|
+ this.upload.title = '导入银行回单'
|
|
|
+ this.upload.open = true
|
|
|
},
|
|
|
submitFileForm() {
|
|
|
- this.$refs.upload.submit();
|
|
|
+ this.$refs.upload.submit()
|
|
|
},
|
|
|
importTemplate() {
|
|
|
importTemplate().then((response) => {
|
|
|
- this.download(response.msg);
|
|
|
- });
|
|
|
+ this.download(response.msg)
|
|
|
+ })
|
|
|
},
|
|
|
// 文件上传中处理
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
|
|
- this.upload.isUploading = true;
|
|
|
+ this.upload.isUploading = true
|
|
|
},
|
|
|
// 文件上传成功处理
|
|
|
handleFileSuccess(response, file, fileList) {
|
|
|
- this.upload.open = false;
|
|
|
- this.upload.isUploading = false;
|
|
|
- this.$refs.upload.clearFiles();
|
|
|
- this.importMsgOpen=true;
|
|
|
- this.importMsg=response.msg
|
|
|
+ this.upload.open = false
|
|
|
+ this.upload.isUploading = false
|
|
|
+ this.$refs.upload.clearFiles()
|
|
|
+ this.importMsgOpen = true
|
|
|
+ this.importMsg = response.msg
|
|
|
// this.$alert(response.msg, '导入结果', {
|
|
|
// dangerouslyUseHTMLString: true
|
|
|
// });
|
|
|
- this.getList();
|
|
|
+ this.getList()
|
|
|
},
|
|
|
|
|
|
- /** 查询部门下拉树结构 */
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
getTreeselect() {
|
|
|
- var that=this;
|
|
|
- var param={companyId:this.companyId}
|
|
|
- treeselect(param).then((response) => {
|
|
|
- this.deptOptions = response.data;
|
|
|
- console.log(this.deptOptions)
|
|
|
- if(response.data!=null&&response.data.length>0){
|
|
|
- //this.queryParams.deptId=response.data[0].id;
|
|
|
- }
|
|
|
- });
|
|
|
+ var that = this
|
|
|
+ var param = { companyId: this.companyId }
|
|
|
+ treeselect(param).then((response) => {
|
|
|
+ this.deptOptions = response.data
|
|
|
+ console.log(this.deptOptions)
|
|
|
+ if (response.data != null && response.data.length > 0) {
|
|
|
+ //this.queryParams.deptId=response.data[0].id;
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- companyChange(val){
|
|
|
- console.log(val);
|
|
|
- this.companyId=val;
|
|
|
- this.getTreeselect();
|
|
|
+ companyChange(val) {
|
|
|
+ console.log(val)
|
|
|
+ this.companyId = val
|
|
|
+ this.getTreeselect()
|
|
|
},
|
|
|
- currDeptChange(val){
|
|
|
- console.log(val)
|
|
|
- this.queryParams.deptId=val;
|
|
|
- this.getList();
|
|
|
+ currDeptChange(val) {
|
|
|
+ console.log(val)
|
|
|
+ this.queryParams.deptId = val
|
|
|
+ this.getList()
|
|
|
},
|
|
|
+ //打开发货单
|
|
|
+ openDeliveryNote() {
|
|
|
+ this.deliveryNoteOpen = true
|
|
|
+ // this.getAppList();
|
|
|
+ },
|
|
|
+ handleClose(done) {
|
|
|
+ this.$confirm('确认关闭?')
|
|
|
+ .then(_ => {
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ .catch(_ => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //发货单模板下载
|
|
|
+ importDeliveryNoteTemplate() {
|
|
|
+ importDeliveryNoteExpressTemplate().then((response) => {
|
|
|
+ this.download(response.msg)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getAppList() {
|
|
|
+ this.miniAppList = []
|
|
|
+ const key = 'courseMa.config'
|
|
|
+ getConfigByKey(key).then(response => {
|
|
|
+ const { code, data } = response
|
|
|
+ if (code === 200) {
|
|
|
+ let value = data?.configValue
|
|
|
+ if (value) {
|
|
|
+ const appList = JSON.parse(value)
|
|
|
+ this.miniAppList = appList.filter(v => v.type === '1').map(v => {
|
|
|
+ return { appId: v.appid, appName: v.name }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 提交发货单
|
|
|
+ submitDeliveryNote() {
|
|
|
+ const uploadFiles = this.$refs.upload.uploadFiles;
|
|
|
+ if (uploadFiles.length === 0) {
|
|
|
+ this.$message.error('请选择要上传的文件');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$refs.upload.submit();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|
|
|
-<style scoped lang="scss">
|
|
|
-.items{
|
|
|
+<style lang="scss" scoped>
|
|
|
+.items {
|
|
|
margin: 5px 0px;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
align-items: center;
|
|
|
justify-content: flex-start;
|
|
|
- .pic{
|
|
|
- width:60px;
|
|
|
- height:60px;
|
|
|
+
|
|
|
+ .pic {
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
}
|
|
|
- .goods-content{
|
|
|
+
|
|
|
+ .goods-content {
|
|
|
margin-left: 10px;
|
|
|
max-width: 200px;
|
|
|
text-align: left;
|
|
|
- .goods-title{
|
|
|
|
|
|
- overflow:hidden;
|
|
|
+ .goods-title {
|
|
|
+
|
|
|
+ overflow: hidden;
|
|
|
white-space: nowrap;
|
|
|
text-overflow: ellipsis;
|
|
|
- -o-text-overflow:ellipsis;
|
|
|
+ -o-text-overflow: ellipsis;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-.el-message-box__message p{
|
|
|
+
|
|
|
+.el-message-box__message p {
|
|
|
max-height: 400px;
|
|
|
- overflow:scroll;
|
|
|
+ overflow: scroll;
|
|
|
}
|
|
|
-.import-msg{
|
|
|
+
|
|
|
+.import-msg {
|
|
|
height: 500px;
|
|
|
overflow: auto;
|
|
|
}
|
|
|
</style>
|
|
|
<style>
|
|
|
- .el-descriptions-item__label.is-bordered-label{
|
|
|
- font-weight: normal;
|
|
|
- }
|
|
|
+.el-descriptions-item__label.is-bordered-label {
|
|
|
+ font-weight: normal;
|
|
|
+}
|
|
|
|
|
|
</style>
|
|
|
|