|
@@ -1,145 +1,166 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="82px">
|
|
|
- <el-form-item label="订单编号" prop="orderNo">
|
|
|
- <el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="订单状态" prop="orderStatus">
|
|
|
- <el-select v-model="queryParams.orderStatus" placeholder="请选择支付状态" clearable>
|
|
|
- <el-option v-for="dict in dict.type.order_service_goods_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="客户姓名" prop="realName">
|
|
|
- <el-input v-model="queryParams.realName" placeholder="请输入客户姓名" clearable @keyup.enter.native="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="手机号" prop="phoneNumber">
|
|
|
- <el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="支付时间">
|
|
|
- <el-date-picker clearable v-model="queryPayTime" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="getPayTime"> </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="下单时间">
|
|
|
- <el-date-picker clearable v-model="queryCreateTime" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="getCreateTime"> </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="82px">
|
|
|
+ <el-form-item label="订单编号" prop="orderNo">
|
|
|
+ <el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="订单状态" prop="orderStatus">
|
|
|
+ <el-select v-model="queryParams.orderStatus" placeholder="请选择支付状态" clearable>
|
|
|
+ <el-option v-for="dict in dict.type.order_service_goods_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="客户姓名" prop="realName">
|
|
|
+ <el-input v-model="queryParams.realName" placeholder="请输入客户姓名" clearable @keyup.enter.native="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="手机号" prop="phoneNumber">
|
|
|
+ <el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付时间">
|
|
|
+ <el-date-picker clearable v-model="queryPayTime" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期" @change="getPayTime"> </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="下单时间">
|
|
|
+ <el-date-picker clearable v-model="queryCreateTime" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期" @change="getCreateTime"> </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <!-- <el-col :span="1.5">-->
|
|
|
+ <!-- <el-button type="warning" plain icon="el-icon-download" @click="handleExport" v-hasPermi="['order:goods:export']" v-if="userInfoVO.userType == '00'">导出</el-button>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <!-- <el-col :span="1.5">-->
|
|
|
- <!-- <el-button type="warning" plain icon="el-icon-download" @click="handleExport" v-hasPermi="['order:goods:export']" v-if="userInfoVO.userType == '00'">导出</el-button>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
-
|
|
|
- <Page uri="/mapi/order/goods/list" :request-params="queryParams" ref="pagination">
|
|
|
- <el-table-column label="订单编号" align="center" prop="orderNo" min-width="150px" />
|
|
|
- <el-table-column label="客户信息" align="center" min-width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.realName ? scope.row.realName : '--' }}</span>
|
|
|
- <br />
|
|
|
- <span>{{ scope.row.phoneNumber ? scope.row.phoneNumber : '' }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <!-- <el-table-column label="预约时间" align="center" prop="appointmentTime" width="150px">
|
|
|
+ <Page uri="/mapi/order/goods/list" :request-params="queryParams" ref="pagination">
|
|
|
+ <el-table-column label="订单编号" align="center" prop="orderNo" min-width="150px" />
|
|
|
+ <el-table-column label="客户信息" align="center" min-width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.realName ? scope.row.realName : '--' }}</span>
|
|
|
+ <br />
|
|
|
+ <span>{{ scope.row.phoneNumber ? scope.row.phoneNumber : '' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column label="预约时间" align="center" prop="appointmentTime" width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.appointmentTime ? scope.row.appointmentTime : '--' }}
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column label="订单总价" align="center" prop="totalPrice" width="100px" />
|
|
|
- <el-table-column label="抵扣金额" align="center" prop="deductAmount" width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.deductAmount ? scope.row.deductAmount : '--' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="支付金额" align="center" prop="payAmount" width="100px" />
|
|
|
- <el-table-column label="支付方式" align="center" prop="payType" width="100px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="订单状态" align="center" prop="orderStatus" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <dict-tag :options="dict.type.order_service_goods_status" :value="scope.row.orderStatus" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="下单时间" align="center" prop="createTime" width="150px" />
|
|
|
- <el-table-column label="支付时间" align="center" prop="payTime" width="150px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.payTime ? scope.row.payTime : '--' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="220">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" icon="el-icon-chat-dot-square" @click="orderDetail(scope.row)">订单详情</el-button>
|
|
|
- <el-button type="text" icon="el-icon-check" @click="btn_receiving(scope.row)" v-if="scope.row.orderStatus == '1'">接单</el-button>
|
|
|
- <el-button type="text" icon="el-icon-check" @click="btn_confirm(scope.row)" v-if="scope.row.orderStatus == '4'">确认完成</el-button>
|
|
|
- <el-button type="text" icon="el-icon-printer" @click="btn_lodop(scope.row)">打印 </el-button>
|
|
|
- <!-- <el-button
|
|
|
+ <el-table-column label="订单总价" align="center" prop="totalPrice" width="100px" />
|
|
|
+ <el-table-column label="抵扣金额" align="center" prop="deductAmount" width="100px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.deductAmount ? scope.row.deductAmount : '--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="支付金额" align="center" prop="payAmount" width="100px" />
|
|
|
+ <el-table-column label="支付方式" align="center" prop="payType" width="100px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="订单状态" align="center" prop="orderStatus" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.order_service_goods_status" :value="scope.row.orderStatus" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="下单时间" align="center" prop="createTime" width="150px" />
|
|
|
+ <el-table-column label="支付时间" align="center" prop="payTime" width="150px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.payTime ? scope.row.payTime : '--' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="220">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" icon="el-icon-chat-dot-square" @click="orderDetail(scope.row)">订单详情</el-button>
|
|
|
+ <el-button type="text" icon="el-icon-check" @click="btn_receiving(scope.row)" v-if="scope.row.orderStatus == '1'">接单</el-button>
|
|
|
+ <el-button type="text" icon="el-icon-check" @click="btn_confirm(scope.row)" v-if="scope.row.orderStatus == '4'">确认完成</el-button>
|
|
|
+ <el-button type="text" icon="el-icon-printer" @click="btn_lodop(scope.row)">打印 </el-button>
|
|
|
+ <!-- <el-button
|
|
|
|
|
|
type="text"
|
|
|
icon="el-icon-check"
|
|
|
@click="outOrderGoods(scope.row)"
|
|
|
v-if="scope.row.orderStatus == '2' && userInfoVO.userType == '00'"
|
|
|
>出货</el-button> -->
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </Page>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </Page>
|
|
|
|
|
|
- <!-- 详情-->
|
|
|
- <el-dialog :title="detailTitle" :visible.sync="openDetail" width="80%" append-to-body>
|
|
|
- <el-card>
|
|
|
- <el-descriptions title="客户信息" v-show="detailView" :column="3" border :label-style="{ 'text-align': 'center' }" :contentStyle="{ 'text-align': 'center' }">
|
|
|
- <el-descriptions-item label="客户姓名">{{ detailView.realName }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="客户手机号">{{ detailView.phoneNumber }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="订单状态">
|
|
|
- <dict-tag :options="dict.type.order_service_goods_status" :value="detailView.orderStatus" />
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="收货联系人">{{ detailView.contactName ? detailView.contactName : '暂无信息' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="收货人手机号">{{ detailView.contactPhone ? detailView.contactPhone : '暂无信息' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="订单总价">{{ detailView.totalPrice ? detailView.totalPrice : '暂无信息' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="下单时间">{{ detailView.createTime ? detailView.createTime : '暂无信息' }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="支付时间">{{ detailView.payTime ? detailView.payTime : '暂无信息' }}</el-descriptions-item>
|
|
|
- <!-- <el-descriptions-item label="发货时间">{{detailView.sendTime?detailView.sendTime:'暂无信息'}}</el-descriptions-item>-->
|
|
|
- <el-descriptions-item label="确认收货时间">{{ detailView.finishTime ? detailView.finishTime : '暂无信息' }}</el-descriptions-item>
|
|
|
- <!-- <el-descriptions-item label="物流公司">{{detailView.deliveryCompany?detailView.deliveryCompany:'暂无信息'}}</el-descriptions-item>-->
|
|
|
- <!-- <el-descriptions-item label="物流单号">{{detailView.totalPrice?detailView.totalPrice:'暂无信息'}}</el-descriptions-item>-->
|
|
|
- <el-descriptions-item label="客户地址" span="3">{{ detailView.province }}{{ detailView.city }}{{ detailView.area }}{{ detailView.address }}{{ detailView.addressDetail }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="备注信息" span="3">{{ detailView.deliveryNo ? detailView.deliveryNo : '暂无信息' }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- </el-card>
|
|
|
- <div class="head-column2">
|
|
|
- <el-table v-loading="detailLoading" :data="detailView.orderGoodsSkuList">
|
|
|
- <!-- <el-table-column label="分类" align="center" prop="goodsCategoryName" /> -->
|
|
|
- <el-table-column :label="goodsType == 0 ? '商品名称' : '服务名称'" align="center" prop="goodsName" width="250px" />
|
|
|
- <el-table-column :label="goodsType == 0 ? '商品规格' : '服务规格'" align="center" width="250px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div style="text-align: center">{{ JSON.parse(scope.row.skuName).join('/') }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="数量" align="center" prop="buyNum" />
|
|
|
- <el-table-column label="价格(元)" align="center" prop="salePrice" />
|
|
|
- <el-table-column label="总和(元)" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.buyNum * scope.row.salePrice }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <el-row :gutter="10" class="box-shadow" style="margin-top: 10px">
|
|
|
- <el-col :span="21">
|
|
|
- <el-form label-width="130px" style="height: 80px; padding-top: 20px; text-align: right" :inline="true" size="small">
|
|
|
- <el-form-item label="总金额(元):">
|
|
|
- {{ costTotalPrice }}
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-dialog>
|
|
|
- </div>
|
|
|
+ <!-- 详情-->
|
|
|
+ <el-dialog :title="detailTitle" :visible.sync="openDetail" width="80%" append-to-body>
|
|
|
+ <el-card>
|
|
|
+ <el-descriptions title="客户信息" v-show="detailView" :column="3" border :label-style="{ 'text-align': 'center' }"
|
|
|
+ :contentStyle="{ 'text-align': 'center' }">
|
|
|
+ <el-descriptions-item label="客户姓名">{{ detailView.realName }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="客户手机号">{{ detailView.phoneNumber }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="订单状态">
|
|
|
+ <dict-tag :options="dict.type.order_service_goods_status" :value="detailView.orderStatus" />
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="收货联系人">{{ detailView.contactName ? detailView.contactName : '暂无信息' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="收货人手机号">{{ detailView.contactPhone ? detailView.contactPhone : '暂无信息' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="订单总价">{{ detailView.totalPrice ? detailView.totalPrice : '暂无信息' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="下单时间">{{ detailView.createTime ? detailView.createTime : '暂无信息' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="支付时间">{{ detailView.payTime ? detailView.payTime : '暂无信息' }}</el-descriptions-item>
|
|
|
+ <!-- <el-descriptions-item label="发货时间">{{detailView.sendTime?detailView.sendTime:'暂无信息'}}</el-descriptions-item>-->
|
|
|
+ <el-descriptions-item label="确认收货时间">{{ detailView.finishTime ? detailView.finishTime : '暂无信息' }}</el-descriptions-item>
|
|
|
+ <!-- <el-descriptions-item label="物流公司">{{detailView.deliveryCompany?detailView.deliveryCompany:'暂无信息'}}</el-descriptions-item>-->
|
|
|
+ <!-- <el-descriptions-item label="物流单号">{{detailView.totalPrice?detailView.totalPrice:'暂无信息'}}</el-descriptions-item>-->
|
|
|
+ <el-descriptions-item label="订单总价">{{ detailView.totalPrice ? detailView.totalPrice : '暂无信息' }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label"> 支付方式 </template>
|
|
|
+ <template v-if="detailView.payType == '0'">微信 ({{ detailView.payAmount }}元)</template>
|
|
|
+ <template v-if="detailView.payType == '1'">支付宝({{ detailView.payAmount }}元)</template>
|
|
|
+ <template v-if="detailView.payType == '2'">现金({{ detailView.payAmount }}元)</template>
|
|
|
+ <template v-if="detailView.payType == '3'">余额({{ detailView.payAmount }}元)</template>
|
|
|
+ <template v-if="detailView.payType == '8'">组合
|
|
|
+ (
|
|
|
+ <span v-if="detailView.memberPayAmount">会员:{{detailView.memberPayAmount}}</span>
|
|
|
+ <span v-if="detailView.balancePayAmount"> 余额:{{detailView.balancePayAmount}}</span>
|
|
|
+ <span v-if="detailView.wechatPayAmount"> 微信:{{detailView.wechatPayAmount}}</span>
|
|
|
+ <span v-if="detailView.alipayPayAmount"> 支付宝:{{detailView.alipayPayAmount}}</span>
|
|
|
+ <span v-if="detailView.cashPayAmount"> 现金:{{detailView.cashPayAmount}}</span>
|
|
|
+ )
|
|
|
+ </template>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="客户地址" span="3">
|
|
|
+ {{ detailView.province }}{{ detailView.city }}{{ detailView.area }}{{ detailView.address }}{{ detailView.addressDetail }}
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="备注信息" span="3">{{ detailView.deliveryNo ? detailView.deliveryNo : '暂无信息' }}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+ <div class="head-column2">
|
|
|
+ <el-table v-loading="detailLoading" :data="detailView.orderGoodsSkuList">
|
|
|
+ <!-- <el-table-column label="分类" align="center" prop="goodsCategoryName" /> -->
|
|
|
+ <el-table-column :label="goodsType == 0 ? '商品名称' : '服务名称'" align="center" prop="goodsName" width="250px" />
|
|
|
+ <el-table-column :label="goodsType == 0 ? '商品规格' : '服务规格'" align="center" width="250px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div style="text-align: center">{{ JSON.parse(scope.row.skuName).join('/') }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="数量" align="center" prop="buyNum" />
|
|
|
+ <el-table-column label="价格(元)" align="center" prop="salePrice" />
|
|
|
+ <el-table-column label="总和(元)" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.buyNum * scope.row.salePrice }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="10" class="box-shadow" style="margin-top: 10px">
|
|
|
+ <el-col :span="21">
|
|
|
+ <el-form label-width="130px" style="height: 80px; padding-top: 20px; text-align: right" :inline="true" size="small">
|
|
|
+ <el-form-item label="总金额(元):">
|
|
|
+ {{ costTotalPrice }}
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -149,233 +170,233 @@ import { getLodop } from '@/utils/lodopUtils'
|
|
|
import { printGoods } from '@/api/order/clothItem'
|
|
|
|
|
|
export default {
|
|
|
- name: 'carBeautyOrder',
|
|
|
- dicts: ['order_service_goods_status', 'delivery_company', 'recharge_pay_type'],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- userInfoVO: null,
|
|
|
- //
|
|
|
- orderLoading: true,
|
|
|
- // 遮罩层
|
|
|
- loading: false,
|
|
|
- detailLoading: true,
|
|
|
- // 选中数组
|
|
|
- ids: [],
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
- // 非多个禁用
|
|
|
- multiple: true,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- // 弹出层标题
|
|
|
- title: '',
|
|
|
- detailTitle: '',
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
- openDetail: false,
|
|
|
- openRePayPage: false,
|
|
|
- openDeliveryPage: false,
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- realName: null,
|
|
|
- phoneNumber: null,
|
|
|
- orderNo: null,
|
|
|
- orderStatus: null
|
|
|
- },
|
|
|
- // 表单参数
|
|
|
- payFrom: {},
|
|
|
- // 表单校验
|
|
|
- rules: {},
|
|
|
- goodsType: null,
|
|
|
- // 商品订单表格数据
|
|
|
- GoodsList: [],
|
|
|
- // 可选商品集合
|
|
|
- goodsList: null,
|
|
|
- // 已选商品集合
|
|
|
- addGoodsList: [],
|
|
|
- // 自定义一个计算数量的临时对象集合
|
|
|
- purchaseCountVOList: [],
|
|
|
- // 总金额
|
|
|
- totalPrice: 0,
|
|
|
- // 总件数
|
|
|
- totalCount: 0,
|
|
|
- // 详情数据
|
|
|
- detailView: {},
|
|
|
- // 详情总金额
|
|
|
- costTotalPrice: null,
|
|
|
- appUserInfo: null,
|
|
|
- goodsOrderInfo: null,
|
|
|
- payMoney: null,
|
|
|
- deliveryVo: {
|
|
|
- orderId: null,
|
|
|
- deliveryCompany: null,
|
|
|
- deliveryNo: null
|
|
|
- },
|
|
|
- queryCreateTime: null,
|
|
|
- queryPayTime: null,
|
|
|
- pointerList: [],
|
|
|
- LODOP: null,
|
|
|
- number: 1,
|
|
|
+ name: 'carBeautyOrder',
|
|
|
+ dicts: ['order_service_goods_status', 'delivery_company', 'recharge_pay_type'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ userInfoVO: null,
|
|
|
+ //
|
|
|
+ orderLoading: true,
|
|
|
+ // 遮罩层
|
|
|
+ loading: false,
|
|
|
+ detailLoading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 弹出层标题
|
|
|
+ title: '',
|
|
|
+ detailTitle: '',
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ openDetail: false,
|
|
|
+ openRePayPage: false,
|
|
|
+ openDeliveryPage: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ realName: null,
|
|
|
+ phoneNumber: null,
|
|
|
+ orderNo: null,
|
|
|
+ orderStatus: null
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ payFrom: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {},
|
|
|
+ goodsType: null,
|
|
|
+ // 商品订单表格数据
|
|
|
+ GoodsList: [],
|
|
|
+ // 可选商品集合
|
|
|
+ goodsList: null,
|
|
|
+ // 已选商品集合
|
|
|
+ addGoodsList: [],
|
|
|
+ // 自定义一个计算数量的临时对象集合
|
|
|
+ purchaseCountVOList: [],
|
|
|
+ // 总金额
|
|
|
+ totalPrice: 0,
|
|
|
+ // 总件数
|
|
|
+ totalCount: 0,
|
|
|
+ // 详情数据
|
|
|
+ detailView: {},
|
|
|
+ // 详情总金额
|
|
|
+ costTotalPrice: null,
|
|
|
+ appUserInfo: null,
|
|
|
+ goodsOrderInfo: null,
|
|
|
+ payMoney: null,
|
|
|
+ deliveryVo: {
|
|
|
+ orderId: null,
|
|
|
+ deliveryCompany: null,
|
|
|
+ deliveryNo: null
|
|
|
+ },
|
|
|
+ queryCreateTime: null,
|
|
|
+ queryPayTime: null,
|
|
|
+ pointerList: [],
|
|
|
+ LODOP: null,
|
|
|
+ number: 1,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.handleUser()
|
|
|
+ // this.goodsType = this.getUrlParam('goodsType')
|
|
|
+ this.goodsType = '3'
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.number = 1
|
|
|
+ const printerTime = setInterval(() => {
|
|
|
+ this.LODOP = getLodop()
|
|
|
+ this.number++
|
|
|
+ if (this.number == 25) {
|
|
|
+ clearInterval(printerTime)
|
|
|
+ }
|
|
|
+ if (this.LODOP) {
|
|
|
+ clearInterval(printerTime)
|
|
|
+ }
|
|
|
+ }, 200)
|
|
|
+
|
|
|
+ this.pointerList = JSON.parse(this.$cache.local.get('printerSeting'))
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ calculateTotalCount() {
|
|
|
+ this.totalCount = 0
|
|
|
+ this.detailView.orderGoodsSkuList.forEach((vo) => {
|
|
|
+ this.totalCount = this.totalCount + vo.buyNum
|
|
|
+ })
|
|
|
+ return this.totalCount
|
|
|
+ },
|
|
|
+ calculatePayMoney() {
|
|
|
+ this.payMoney = this.payFrom.deductAmount ? this.costTotalPrice - this.payFrom.deductAmount : this.costTotalPrice
|
|
|
+ return this.payMoney
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ btn_lodop(row) {
|
|
|
+ if (!this.LODOP) {
|
|
|
+ this.$modal.msgError('请安装打印机软件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ let p_name = ''
|
|
|
+
|
|
|
+ this.pointerList.forEach((pointer) => {
|
|
|
+ if (pointer.printType == 0) {
|
|
|
+ p_name = pointer.printName
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ printGoods(row.id).then((res) => {
|
|
|
+ if (this.userInfoVO.userType == '02') {
|
|
|
+ const obj = {
|
|
|
+ name: this.userInfoVO.storeName,
|
|
|
+ contactPhone: this.userInfoVO.phonenumber,
|
|
|
+ user: this.userInfoVO.nickName
|
|
|
+ }
|
|
|
+ res.data.sysOrg = obj
|
|
|
}
|
|
|
+ res.data.newTime = this.formatDates(new Date(), 1)
|
|
|
+ this.goodsPrinter(this.LODOP, res.data, p_name)
|
|
|
+ })
|
|
|
},
|
|
|
- created() {
|
|
|
- this.handleUser()
|
|
|
- // this.goodsType = this.getUrlParam('goodsType')
|
|
|
- this.goodsType = '3'
|
|
|
- this.getList()
|
|
|
+ handleUser() {
|
|
|
+ this.userInfoVO = this.getUserInfo()
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.number = 1
|
|
|
- const printerTime = setInterval(() => {
|
|
|
- this.LODOP = getLodop()
|
|
|
- this.number++
|
|
|
- if (this.number == 25) {
|
|
|
- clearInterval(printerTime)
|
|
|
- }
|
|
|
- if (this.LODOP) {
|
|
|
- clearInterval(printerTime)
|
|
|
- }
|
|
|
- }, 200)
|
|
|
-
|
|
|
- this.pointerList = JSON.parse(this.$cache.local.get('printerSeting'))
|
|
|
+ getCreateTime() {
|
|
|
+ if (this.queryCreateTime != null) {
|
|
|
+ this.queryParams.createTimeFrom = this.queryCreateTime[0]
|
|
|
+ this.queryParams.createTimeTo = this.queryCreateTime[1]
|
|
|
+ }
|
|
|
},
|
|
|
- computed: {
|
|
|
- calculateTotalCount() {
|
|
|
- this.totalCount = 0
|
|
|
- this.detailView.orderGoodsSkuList.forEach((vo) => {
|
|
|
- this.totalCount = this.totalCount + vo.buyNum
|
|
|
- })
|
|
|
- return this.totalCount
|
|
|
- },
|
|
|
- calculatePayMoney() {
|
|
|
- this.payMoney = this.payFrom.deductAmount ? this.costTotalPrice - this.payFrom.deductAmount : this.costTotalPrice
|
|
|
- return this.payMoney
|
|
|
- }
|
|
|
+ getPayTime() {
|
|
|
+ if (this.queryPayTime != null) {
|
|
|
+ this.queryParams.beginPayTime = this.queryPayTime[0]
|
|
|
+ this.queryParams.endPayTime = this.queryPayTime[1]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ this.queryParams.goodsType = this.goodsType
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.pagination.handleSearch(true)
|
|
|
+ })
|
|
|
},
|
|
|
- methods: {
|
|
|
- btn_lodop(row) {
|
|
|
- if (!this.LODOP) {
|
|
|
- this.$modal.msgError('请安装打印机软件')
|
|
|
- return
|
|
|
- }
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.queryCreateTime = null
|
|
|
+ this.queryParams.createTimeFrom = null
|
|
|
+ this.queryParams.createTimeTo = null
|
|
|
|
|
|
- let p_name = ''
|
|
|
+ this.queryPayTime = null
|
|
|
+ this.queryParams.beginPayTime = null
|
|
|
+ this.queryParams.endPayTime = null
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
+ },
|
|
|
|
|
|
- this.pointerList.forEach((pointer) => {
|
|
|
- if (pointer.printType == 0) {
|
|
|
- p_name = pointer.printName
|
|
|
- }
|
|
|
- })
|
|
|
+ // 订单详情
|
|
|
+ orderDetail(row) {
|
|
|
+ this.openDetail = true
|
|
|
+ this.detailTitle = '订单详情'
|
|
|
+ this.detailLoading = true
|
|
|
+ this.detailView = {}
|
|
|
+ const id = row.id
|
|
|
+ getGoods(id).then((response) => {
|
|
|
+ this.detailView = response.data
|
|
|
+ this.costTotalPrice = this.detailView.totalPrice
|
|
|
+ this.detailLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
- printGoods(row.id).then((res) => {
|
|
|
- if (this.userInfoVO.userType == '02') {
|
|
|
- const obj = {
|
|
|
- name: this.userInfoVO.storeName,
|
|
|
- contactPhone: this.userInfoVO.phonenumber,
|
|
|
- user: this.userInfoVO.nickName
|
|
|
- }
|
|
|
- res.data.sysOrg = obj
|
|
|
- }
|
|
|
- res.data.newTime = this.formatDates(new Date(), 1)
|
|
|
- this.goodsPrinter(this.LODOP, res.data, p_name)
|
|
|
- })
|
|
|
- },
|
|
|
- handleUser() {
|
|
|
- this.userInfoVO = this.getUserInfo()
|
|
|
- },
|
|
|
- getCreateTime() {
|
|
|
- if (this.queryCreateTime != null) {
|
|
|
- this.queryParams.createTimeFrom = this.queryCreateTime[0]
|
|
|
- this.queryParams.createTimeTo = this.queryCreateTime[1]
|
|
|
- }
|
|
|
- },
|
|
|
- getPayTime() {
|
|
|
- if (this.queryPayTime != null) {
|
|
|
- this.queryParams.beginPayTime = this.queryPayTime[0]
|
|
|
- this.queryParams.endPayTime = this.queryPayTime[1]
|
|
|
- }
|
|
|
- },
|
|
|
- getList() {
|
|
|
- this.queryParams.goodsType = this.goodsType
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.pagination.handleSearch(true)
|
|
|
- })
|
|
|
- },
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.queryParams.pageNum = 1
|
|
|
+ //接单
|
|
|
+ btn_receiving(row) {
|
|
|
+ this.$confirm('是否确认接单?')
|
|
|
+ .then(() => {
|
|
|
+ const vo = {
|
|
|
+ orderId: row.id
|
|
|
+ }
|
|
|
+ receiveOrder(vo).then((response2) => {
|
|
|
+ this.$modal.msgSuccess('接单成功')
|
|
|
this.getList()
|
|
|
- },
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.queryCreateTime = null
|
|
|
- this.queryParams.createTimeFrom = null
|
|
|
- this.queryParams.createTimeTo = null
|
|
|
-
|
|
|
- this.queryPayTime = null
|
|
|
- this.queryParams.beginPayTime = null
|
|
|
- this.queryParams.endPayTime = null
|
|
|
- this.resetForm('queryForm')
|
|
|
- this.handleQuery()
|
|
|
- },
|
|
|
-
|
|
|
- // 订单详情
|
|
|
- orderDetail(row) {
|
|
|
- this.openDetail = true
|
|
|
- this.detailTitle = '订单详情'
|
|
|
- this.detailLoading = true
|
|
|
- this.detailView = {}
|
|
|
- const id = row.id
|
|
|
- getGoods(id).then((response) => {
|
|
|
- this.detailView = response.data
|
|
|
- this.costTotalPrice = this.detailView.totalPrice
|
|
|
- this.detailLoading = false
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- //接单
|
|
|
- btn_receiving(row) {
|
|
|
- this.$confirm('是否确认接单?')
|
|
|
- .then(() => {
|
|
|
- const vo = {
|
|
|
- orderId: row.id
|
|
|
- }
|
|
|
- receiveOrder(vo).then((response2) => {
|
|
|
- this.$modal.msgSuccess('接单成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
- },
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => { })
|
|
|
+ },
|
|
|
|
|
|
- //确认订单
|
|
|
- btn_confirm(row) {
|
|
|
- this.$confirm('是否确认完成该订单?')
|
|
|
- .then(() => {
|
|
|
- const vo = {
|
|
|
- orderId: row.id
|
|
|
- }
|
|
|
- confirmFinish(vo).then((response2) => {
|
|
|
- this.$modal.msgSuccess('确认完成成功')
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ //确认订单
|
|
|
+ btn_confirm(row) {
|
|
|
+ this.$confirm('是否确认完成该订单?')
|
|
|
+ .then(() => {
|
|
|
+ const vo = {
|
|
|
+ orderId: row.id
|
|
|
+ }
|
|
|
+ confirmFinish(vo).then((response2) => {
|
|
|
+ this.$modal.msgSuccess('确认完成成功')
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => { })
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.download(
|
|
|
+ 'mapi/order/goods/export',
|
|
|
+ {
|
|
|
+ ...this.queryParams,
|
|
|
+ ...{ goodsType: this.goodsType }
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download(
|
|
|
- 'mapi/order/goods/export',
|
|
|
- {
|
|
|
- ...this.queryParams,
|
|
|
- ...{ goodsType: this.goodsType }
|
|
|
- },
|
|
|
- `goods_order_${new Date().getTime()}.xlsx`
|
|
|
- )
|
|
|
- }
|
|
|
+ `goods_order_${new Date().getTime()}.xlsx`
|
|
|
+ )
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style>
|