便利店
This commit is contained in:
parent
88151c5fc8
commit
5472e4253b
@ -3,8 +3,16 @@ import request from '@/utils/request'
|
||||
// 查询商品列表
|
||||
export function listOrder(query) {
|
||||
return request({
|
||||
url: '/api/order/list',
|
||||
url: '/business/order/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据订单id查询商品订单信息
|
||||
export function getOrderGoods(orderId) {
|
||||
return request({
|
||||
url: '/business/orderGoods/' + orderId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
@ -9,6 +9,14 @@ export function listStaff(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有员工
|
||||
export function queryStaffs() {
|
||||
return request({
|
||||
url: '/business/member/staff/query',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询员工详细
|
||||
export function getStaff(id) {
|
||||
return request({
|
||||
|
@ -34,7 +34,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员等级" prop="name">
|
||||
<el-form-item label="会员等级" prop="gradeId">
|
||||
<el-select
|
||||
v-model="queryParams.gradeId"
|
||||
clearable
|
||||
@ -43,7 +43,7 @@
|
||||
<el-option v-for="grade in userGradeList" :key="grade.id+''" :label="grade.name" :value="grade.id+''"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="gradeId">
|
||||
<el-form-item label="" prop="balance">
|
||||
<el-select
|
||||
v-model="ifBalance"
|
||||
clearable
|
||||
|
@ -1,519 +1,231 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" class="main-search" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="会员ID" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入会员ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input
|
||||
v-model="queryParams.mobile"
|
||||
placeholder="请输入会员手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input
|
||||
v-model="queryParams.orderSn"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单类型" prop="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
clearable
|
||||
placeholder="订单类型"
|
||||
>
|
||||
<el-option v-for="orderType in typeList" :key="orderType.key" :label="orderType.name" :value="orderType.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属店铺" prop="storeIds">
|
||||
<el-select v-model="storeIds" multiple filterable clearable placeholder="请选择店铺" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in storeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择订单状态"
|
||||
clearable
|
||||
>
|
||||
<el-option v-for="statusItem in statusList" :key="statusItem.key+''" :label="statusItem.name" :value="statusItem.key+''"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付状态" prop="payStatus">
|
||||
<el-select
|
||||
v-model="queryParams.payStatus"
|
||||
placeholder="支付状态"
|
||||
clearable
|
||||
>
|
||||
<el-option v-for="statusItem in payStatusList" :key="statusItem.key+''" :label="statusItem.name" :value="statusItem.key+''"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="配送方式">
|
||||
<el-select
|
||||
v-model="queryParams.orderMode"
|
||||
placeholder="配送方式"
|
||||
clearable
|
||||
>
|
||||
<el-option v-for="item in orderModeList" :key="item.key+''" :label="item.name" :value="item.key+''"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
style="width:190px"
|
||||
placeholder="开始时间"
|
||||
></el-date-picker>
|
||||
<span class="sp"> ~ </span>
|
||||
<el-date-picker
|
||||
v-model="queryParams.endTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
style="width:190px"
|
||||
placeholder="结束时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table-column label="订单ID" prop="id" min-width="80"/>
|
||||
<el-table-column label="订单号" align="center" width="200" prop="orderSn">
|
||||
<template slot-scope="scope">
|
||||
<span @click="handleView(scope.row)" style="color: #00afff;cursor: pointer;">{{ scope.row.orderSn }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="会员名称" align="center" prop="orderInfo.name">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.userInfo && scope.row.isVisitor == 'N'">
|
||||
<span>{{ scope.row.userInfo.name }}</span>
|
||||
</span>
|
||||
<span v-else>游客</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单类型" align="center" prop="typeName">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.typeName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属店铺" align="center" width="140" prop="storeInfo.name">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.storeInfo">{{ scope.row.storeInfo.name }}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" prop="amount">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="true">{{ scope.row.amount.toFixed(2) }}</span>
|
||||
<span v-else>0.00</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付状态" align="center" width="80" prop="payStatus">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payStatus == 'B'" class="status-active">{{ getName(payStatusList, scope.row.payStatus) }}</span>
|
||||
<span v-else class="status-disabled">{{ getName(payStatusList, scope.row.payStatus) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态" align="center" width="80" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span class="status-normal">{{ getName(statusList, scope.row.status) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="配送方式" align="center" prop="orderMode">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getName(orderModeList, scope.row.orderMode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生成时间" align="center" width="130" prop="createTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付金额" align="center" prop="payAmount">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="true">{{ scope.row.payAmount.toFixed(2) }}</span>
|
||||
<span v-else>0.00</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="优惠金额" align="center" prop="discount">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="true">{{ scope.row.discount.toFixed(2) }}</span>
|
||||
<span v-else>0.00</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="积分金额" align="center" prop="pointAmount">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="true">{{ scope.row.pointAmount.toFixed(2) }}</span>
|
||||
<span v-else>0.00</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" align="center" width="130" prop="updateTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.updateTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="130" fixed='right'>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-hasPermi="['order:edit']"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.orderMode == 'express'"
|
||||
size="mini"
|
||||
type="text"
|
||||
v-hasPermi="['order:edit']"
|
||||
@click="handleExpress(scope.row)"
|
||||
>发货</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.orderMode == 'oneself'"
|
||||
type="text"
|
||||
size="mini"
|
||||
:disabled="scope.row.isVerify == true"
|
||||
@click="handleVerify(scope.row)"
|
||||
v-hasPermi="['order:edit']"
|
||||
>核销</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['order:edit', 'order:delete']">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleView" icon="el-icon-view" v-hasPermi="['order:index']">查看详情</el-dropdown-item>
|
||||
<el-dropdown-item command="handlePrint" icon="el-icon-notebook-2" v-hasPermi="['order:index']">打印小票</el-dropdown-item>
|
||||
<el-dropdown-item v-if="scope.row.payStatus == 'B'" command="handleRefund" icon="el-icon-s-order" v-hasPermi="['order:index']">立即退款</el-dropdown-item>
|
||||
<el-dropdown-item v-if="scope.row.payStatus != 'B'" command="handleDelete" icon="el-icon-remove" v-hasPermi="['order:delete']">删除订单</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 修改对话框 start-->
|
||||
<el-dialog :title="title" :visible.sync="open" class="common-dialog" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input v-model="form.orderSn" placeholder="订单号" disabled maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.orderMode && form.orderMode.length > 0">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单模式" prop="orderMode">
|
||||
<el-select v-model="form.orderMode" placeholder="订单模式">
|
||||
<el-option v-for="item in orderModeList" :key="item.key+''" :label="item.name" :value="item.key+''"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单总金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入订单总金额" maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="优惠金额" prop="discount">
|
||||
<el-input v-model="form.discount" placeholder="请输入优惠金额" maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入订单备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单状态">
|
||||
<el-select v-model="form.status" placeholder="订单状态">
|
||||
<el-option v-for="statusItem in statusList" :key="statusItem.key+''" :label="statusItem.name" :value="statusItem.key+''"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-card>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="交易员工" prop="staffId">
|
||||
<el-select
|
||||
v-model="queryParams.staffId"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
<span style="float: left">{{ item.realName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单类型" prop="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
clearable
|
||||
placeholder="全部"
|
||||
>
|
||||
<el-option label="交易" value="交易"/>
|
||||
<el-option label="退款" value="退款"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付类型" prop="payType">
|
||||
<el-select
|
||||
v-model="queryParams.payType"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.payment_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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="payUser">
|
||||
<el-input
|
||||
v-model="queryParams.payUser"
|
||||
placeholder="请输入会员手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交易时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></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 slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改对话框 end-->
|
||||
</el-card>
|
||||
|
||||
<!-- 核销对话框 start-->
|
||||
<el-dialog title="核销订单" :visible.sync="openVerify" class="common-dialog" width="700px" append-to-body>
|
||||
<el-form ref="vForm" :model="vForm" :rules="vFormRules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input v-model="vForm.orderSn" placeholder="订单号" disabled maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="核销码" prop="verifyCode">
|
||||
<el-input v-model="vForm.verifyCode" placeholder="请输入订单核销码,从会员端的订单详情获取" maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单备注" prop="remark">
|
||||
<el-input v-model="vForm.remark" type="textarea" placeholder="请输入订单备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitVForm">确定核销</el-button>
|
||||
<el-button @click="cancelVForm">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 核销对话框 end-->
|
||||
<el-card>
|
||||
<el-table ref="tables" v-loading="loading" :data="list"
|
||||
@selection-change="handleSelectionChange" :default-sort="defaultSort"
|
||||
@sort-change="handleSortChange">
|
||||
<el-table-column label="订单ID" prop="id" width="80"/>
|
||||
<el-table-column label="终端" align="center" prop="terminal"/>
|
||||
<el-table-column label="订单号" align="center" prop="orderNo"/>
|
||||
<el-table-column label="订单金额" align="center" prop="amount"/>
|
||||
<el-table-column label="优惠金额" align="center" prop="discount"/>
|
||||
<el-table-column label="商品数量" align="center" prop="goodsNum">
|
||||
<template slot-scope="scope">
|
||||
<el-tag @click="getGoods(scope.row.id)">{{ scope.row.goodsNum }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款用户" align="center" prop="payUser"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单类型" align="center" prop="type"/>
|
||||
<el-table-column label="交易员工" align="center" prop="staffId">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRealName(staffList,scope.row.staffId) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易时间" align="center" width="150" prop="createTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 发货对话框 start-->
|
||||
<el-dialog title="填写物流信息" :visible.sync="openExpress" class="common-dialog" width="700px" append-to-body>
|
||||
<el-form ref="eForm" :model="eForm" :rules="eFormRules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input v-model="eForm.orderSn" placeholder="订单号" disabled maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="物流公司" prop="expressCompany">
|
||||
<el-input v-model="eForm.expressCompany" placeholder="请输入物流公司" maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="物流单号" prop="expressNo">
|
||||
<el-input v-model="eForm.expressNo" placeholder="请输入物流单号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitEForm">提交物流信息</el-button>
|
||||
<el-button @click="cancelEForm">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 核销对话框 end-->
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.page"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<!--打印订单对话框 start-->
|
||||
<orderPrintDialog :show-dialog="openOrderPrintDialog" :storeInfo="storeInfo" :orderInfo="orderInfo" @closeDialog="closePrintDialog"/>
|
||||
<!--打印订单对话框 end-->
|
||||
|
||||
<!-- 退款对话框 start -->
|
||||
<el-dialog title="订单退款" :visible.sync="openRefundDialog" class="common-dialog" width="700px" append-to-body>
|
||||
<el-form ref="rForm" :model="rForm" :rules="rFormRules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="订单号" prop="orderSn" style="width:450px;">
|
||||
<el-input v-model="rForm.orderSn" placeholder="订单号" disabled maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="支付方式" prop="payType" style="width:450px;">
|
||||
<el-input v-model="rForm.payType" placeholder="支付方式" disabled maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="实付金额" prop="payAmount" style="width:450px;">
|
||||
<el-input v-model="'¥' + rForm.payAmount" placeholder="订单实付金额" disabled maxlength="100" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="退款金额" prop="refundAmount" style="width:450px;">
|
||||
<el-input v-model="rForm.refundAmount" placeholder="请输入退款金额"></el-input>
|
||||
<div class="form-tips">( 提示:单位元 )</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="退款备注" prop="remark">
|
||||
<el-input v-model="rForm.remark" type="textarea" placeholder="请输入退款备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitRForm">确 定</el-button>
|
||||
<el-button @click="cancelRForm">取 消</el-button>
|
||||
</div>
|
||||
<!-- 商品购买详情 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-table ref="tables" v-loading="loading" :data="goodsList" :default-sort="defaultSort">
|
||||
<el-table-column label="商品名称" align="center" prop="name"/>
|
||||
<el-table-column label="商品数量" align="center" prop="num"/>
|
||||
<el-table-column label="商品单价" align="center" prop="retailPrice"/>
|
||||
<el-table-column label="会员价" align="center" prop="memberPrice"/>
|
||||
</el-table>
|
||||
<div style="height: 20px"></div>
|
||||
</el-dialog>
|
||||
<!-- 退款对话框 end -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getName } from "@/utils/fuint";
|
||||
import { getOrderList, updateOrderStatus, getOrderInfo, saveOrder, deleteOrder, verifyOrder, delivered } from "@/api/order";
|
||||
import { updateOrderStatus, getOrderInfo, saveOrder, deleteOrder, verifyOrder, delivered } from "@/api/order";
|
||||
import { doRefund } from "@/api/refund";
|
||||
import orderPrintDialog from '../cashier/components/orderPrintDialog'
|
||||
import {listOrder} from "@/api/order/order";
|
||||
import {getOrderGoods, listOrder} from "@/api/order/order";
|
||||
import {queryStaffs} from "@/api/staff/staff";
|
||||
export default {
|
||||
name: "OrderIndex",
|
||||
components: {
|
||||
orderPrintDialog
|
||||
},
|
||||
dicts: ['payment_type'],
|
||||
data() {
|
||||
return {
|
||||
// 员工列表
|
||||
staffList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 标题
|
||||
title: "",
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
list: [],
|
||||
// 店铺列表
|
||||
storeList: [],
|
||||
// 所属店铺
|
||||
storeIds: [],
|
||||
// 订单类型
|
||||
typeList: [],
|
||||
// 订单状态列表
|
||||
statusList: [],
|
||||
// 订单支付状态列表
|
||||
payStatusList: [],
|
||||
// 配送类型列表
|
||||
orderModeList: [],
|
||||
// 支付类型
|
||||
payTypeList: [],
|
||||
goodsList:[],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否显示核销对话框
|
||||
openVerify: false,
|
||||
// 是否显示发货对话框
|
||||
openExpress: false,
|
||||
// 默认排序
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
// 打印订单对话框
|
||||
openOrderPrintDialog: false,
|
||||
// 退款对话框
|
||||
openRefundDialog: false,
|
||||
storeInfo: {},
|
||||
orderInfo: {},
|
||||
// 表单参数
|
||||
form: { orderId: "", orderSn: 0, amount: "", orderMode: "oneself", discount: "", remark: "", status: "A" },
|
||||
vForm: { orderId: "", orderSn: "", remark: "", verifyCode: "" },
|
||||
eForm: { orderId: "", orderSn: "", expressCompany: "", expressNo: "" },
|
||||
rForm: { orderId: "", orderSn: "", payType: '', payAmount: "", refundAmount: "", remark: ""},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
userId: '',
|
||||
mobile: '',
|
||||
status: '',
|
||||
payStatus: '',
|
||||
orderMode: '',
|
||||
orderSn: '',
|
||||
storeIds: ''
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
amount: [
|
||||
{ required: true, message: "总金额不能为空", trigger: "blur" },
|
||||
]
|
||||
},
|
||||
// 核销表单校验
|
||||
vFormRules: {
|
||||
verifyCode: [
|
||||
{ required: true, message: "核销码不能为空", trigger: "blur" },
|
||||
]
|
||||
},
|
||||
eFormRules: {
|
||||
expressCompany: [
|
||||
{ required: true, message: "物流公司不能为空", trigger: "blur" },
|
||||
],
|
||||
expressNo: [
|
||||
{ required: true, message: "物流单号不能为空", trigger: "blur" },
|
||||
]
|
||||
},
|
||||
rFormRules: {
|
||||
refundAmount: [
|
||||
{ required: true, message: "退款金额不能为空", trigger: "blur" },
|
||||
{ pattern: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/, message: `请输入正确的退款金额`, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getStaffList();
|
||||
},
|
||||
methods: {
|
||||
// 获取商品详情
|
||||
getGoods(id){
|
||||
this.open = true;
|
||||
this.title = "商品详情"
|
||||
getOrderGoods(id).then( response => {
|
||||
this.goodsList = response.data
|
||||
})
|
||||
},
|
||||
// 获取员工姓名
|
||||
getRealName(list,id){
|
||||
var name = "";
|
||||
list.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.realName;
|
||||
}
|
||||
})
|
||||
return name;
|
||||
},
|
||||
// 获取员工列表
|
||||
getStaffList(){
|
||||
queryStaffs().then( response => {
|
||||
this.staffList = response.data;
|
||||
})
|
||||
},
|
||||
// 查询订单
|
||||
getList() {
|
||||
listOrder().then( response => {
|
||||
console.log(response)
|
||||
this.loading = true;
|
||||
listOrder(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||
this.list = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
})
|
||||
const app = this;
|
||||
app.loading = true;
|
||||
app.queryParams.storeIds = app.storeIds ? app.storeIds.join(",") : '';
|
||||
getOrderList(app.queryParams).then( response => {
|
||||
this.list = response.data.paginationResponse.content;
|
||||
this.total = response.data.paginationResponse.totalElements;
|
||||
this.typeList = response.data.typeList;
|
||||
this.statusList = response.data.statusList;
|
||||
this.payStatusList = response.data.payStatusList;
|
||||
this.orderModeList = response.data.orderModeList;
|
||||
this.payTypeList = response.data.payTypeList;
|
||||
this.storeList = response.data.storeList;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
// const app = this;
|
||||
// app.loading = true;
|
||||
// app.queryParams.storeIds = app.storeIds ? app.storeIds.join(",") : '';
|
||||
// getOrderList(app.queryParams).then( response => {
|
||||
// this.list = response.data.paginationResponse.content;
|
||||
// this.total = response.data.paginationResponse.totalElements;
|
||||
// this.typeList = response.data.typeList;
|
||||
// this.statusList = response.data.statusList;
|
||||
// this.payStatusList = response.data.payStatusList;
|
||||
// this.orderModeList = response.data.orderModeList;
|
||||
// this.payTypeList = response.data.payTypeList;
|
||||
// this.storeList = response.data.storeList;
|
||||
// this.loading = false;
|
||||
// }
|
||||
// );
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
@ -604,10 +316,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查看详情按钮操作
|
||||
handleView(row) {
|
||||
this.$router.push( { path: '/order/detail?orderId=' + row.id } )
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
const app = this;
|
||||
|
@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@ -34,6 +35,16 @@ public class LJStaffController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有员工信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/query")
|
||||
public ResponseObject queryStaff(){
|
||||
List<LJStaff> list = mtStaffService.queryStaffList();
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
* @param id
|
||||
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.member.entity.LJStaff;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 员工管理 业务层
|
||||
*/
|
||||
@ -16,6 +18,12 @@ public interface ILJStaffService extends IService<LJStaff> {
|
||||
*/
|
||||
public IPage<LJStaff> selectStaffList(Page page, LJStaff LJStaff);
|
||||
|
||||
/**
|
||||
* 查询所有员工信息
|
||||
* @return
|
||||
*/
|
||||
public List<LJStaff> queryStaffList();
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
* @param id
|
||||
|
@ -9,6 +9,7 @@ import com.fuint.business.member.mapper.LJStaffMapper;
|
||||
import com.fuint.business.member.service.ILJStaffService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.service.AccountService;
|
||||
import com.fuint.common.util.StringUtils;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.repository.model.TAccount;
|
||||
import com.fuint.utils.Digests;
|
||||
@ -19,6 +20,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@ -43,6 +45,20 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
return baseMapper.selectLJStaffList(page,staff);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有员工信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LJStaff> queryStaffList() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
* @param id
|
||||
@ -99,7 +115,9 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
staff.setStoreId(storeId);
|
||||
this.entryptPassword(staff);
|
||||
if (StringUtils.isNotEmpty(staff.getRefundPassword())){
|
||||
this.entryptPassword(staff);
|
||||
}
|
||||
int row = baseMapper.insert(staff);
|
||||
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile());
|
||||
// 添加账户信息
|
||||
@ -116,7 +134,11 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
account.setCreateTime(new Date());
|
||||
account.setUpdateTime(new Date());
|
||||
account.setStoreId(storeId);
|
||||
account.setPassword(staff.getPassword());
|
||||
if (StringUtils.isNotEmpty(staff.getRefundPassword())){
|
||||
account.setPassword(staff.getPassword());
|
||||
}else {
|
||||
account.setPassword("123456");
|
||||
}
|
||||
|
||||
accountService.createAccountInfo(account,null);
|
||||
return row;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.fuint.api.order.controller;
|
||||
package com.fuint.business.order.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.api.order.entity.LJOrder;
|
||||
import com.fuint.api.order.service.LJOrderService;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.service.LJOrderService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* 订单信息 controller层
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/order")
|
||||
@RequestMapping("/business/order")
|
||||
public class LJOrderController extends BaseController {
|
||||
@Autowired
|
||||
private LJOrderService orderService;
|
@ -0,0 +1,34 @@
|
||||
package com.fuint.business.order.controller;
|
||||
|
||||
import com.fuint.business.order.service.OrderGoodsService;
|
||||
import com.fuint.business.order.vo.OrderGoodsVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品订单信息 controller层
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business/orderGoods")
|
||||
public class OrderGoodsController extends BaseController {
|
||||
@Autowired
|
||||
private OrderGoodsService orderGoodsService;
|
||||
|
||||
/**
|
||||
* 根据订单id查询商品订单信息
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{orderId}")
|
||||
public ResponseObject list(@PathVariable Integer orderId){
|
||||
List<OrderGoodsVo> list = orderGoodsService.selectOrderGoods(orderId);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.fuint.api.order.entity;
|
||||
package com.fuint.business.order.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -30,6 +30,10 @@ public class LJOrder extends BaseEntity implements Serializable {
|
||||
* 订单类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 终端
|
||||
*/
|
||||
private String terminal;
|
||||
/**
|
||||
* 付款用户
|
||||
*/
|
||||
@ -50,6 +54,10 @@ public class LJOrder extends BaseEntity implements Serializable {
|
||||
* 用户ID
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private Double goodsNum;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
@ -0,0 +1,148 @@
|
||||
package com.fuint.business.order.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 订单商品表(OrderGoods)实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName("mt_order_goods")
|
||||
@ApiModel(value = "OrderGoods对象", description = "订单商品表")
|
||||
public class OrderGoods extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 自增ID
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Integer goodsId;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Double price;
|
||||
/**
|
||||
* 优惠价
|
||||
*/
|
||||
private Double discount;
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private Integer num;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(Integer orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Integer getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Integer goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public Double getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
|
||||
public void setDiscount(Double discount) {
|
||||
this.discount = discount;
|
||||
}
|
||||
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(Integer num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.fuint.api.order.mapper;
|
||||
package com.fuint.business.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.api.order.entity.LJOrder;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
@ -0,0 +1,16 @@
|
||||
package com.fuint.business.order.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.order.entity.OrderGoods;
|
||||
import com.fuint.business.order.vo.OrderGoodsVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
|
||||
/**
|
||||
* 根据订单id查询商品订单信息
|
||||
* @return
|
||||
*/
|
||||
public List<OrderGoodsVo> selectOrderGoods(@Param("orderId") int orderId);
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.api.order.mapper.LJOrderMapper">
|
||||
<mapper namespace="com.fuint.business.order.mapper.LJOrderMapper">
|
||||
<sql id="selectOrders">
|
||||
select * from mt_order
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderList" resultType="com.fuint.api.order.entity.LJOrder">
|
||||
<select id="selectOrderList" resultType="com.fuint.business.order.entity.LJOrder">
|
||||
<include refid="selectOrders"></include>
|
||||
<where>
|
||||
store_id = #{order.storeId}
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.order.mapper.OrderGoodsMapper">
|
||||
<sql id="selectOrderGoods">
|
||||
select mog.id,mog.order_id,mog.goods_id,mg.name,mg.retail_price,mg.member_price,mog.num
|
||||
from mt_order_goods mog inner join mt_goods mg
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderGoods" resultType="com.fuint.business.order.vo.OrderGoodsVo">
|
||||
<include refid="selectOrderGoods"></include>
|
||||
<where>
|
||||
mog.goods_id = mg.id and mog.order_id = #{orderId}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -1,10 +1,9 @@
|
||||
package com.fuint.api.order.service;
|
||||
package com.fuint.business.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.api.order.entity.LJOrder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
|
||||
/**
|
||||
* 订单信息 业务层
|
@ -0,0 +1,18 @@
|
||||
package com.fuint.business.order.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.order.entity.OrderGoods;
|
||||
import com.fuint.business.order.vo.OrderGoodsVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品订单记录 业务层
|
||||
*/
|
||||
public interface OrderGoodsService extends IService<OrderGoods> {
|
||||
/**
|
||||
* 根据订单id查询商品订单信息
|
||||
* @return
|
||||
*/
|
||||
public List<OrderGoodsVo> selectOrderGoods(int orderId);
|
||||
}
|
@ -1,22 +1,22 @@
|
||||
package com.fuint.api.order.service.impl;
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.order.entity.LJOrder;
|
||||
import com.fuint.api.order.mapper.LJOrderMapper;
|
||||
import com.fuint.api.order.service.LJOrderService;
|
||||
import com.fuint.business.order.entity.LJOrder;
|
||||
import com.fuint.business.order.mapper.LJOrderMapper;
|
||||
import com.fuint.business.order.service.LJOrderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
//import com.fuint.common.dto.AccountInfo;
|
||||
//import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
|
||||
@Service
|
||||
public class LJOrderServiceImpl extends ServiceImpl<LJOrderMapper, LJOrder> implements LJOrderService {
|
||||
@Override
|
||||
public IPage<LJOrder> selectOrderList(Page page, LJOrder order) {
|
||||
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// Integer storeId = nowAccountInfo.getStoreId();
|
||||
order.setStoreId(0);
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
order.setStoreId(storeId);
|
||||
IPage<LJOrder> ljOrderIPage = baseMapper.selectOrderList(page, order);
|
||||
return ljOrderIPage;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.fuint.business.order.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.order.entity.OrderGoods;
|
||||
import com.fuint.business.order.mapper.OrderGoodsMapper;
|
||||
import com.fuint.business.order.service.OrderGoodsService;
|
||||
import com.fuint.business.order.vo.OrderGoodsVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGoods> implements OrderGoodsService {
|
||||
@Override
|
||||
public List<OrderGoodsVo> selectOrderGoods(int orderId) {
|
||||
List<OrderGoodsVo> list = baseMapper.selectOrderGoods(orderId);
|
||||
return list;
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.fuint.business.order.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrderGoodsVo {
|
||||
private Integer id;
|
||||
private Integer orderId;
|
||||
private Integer goods_id;
|
||||
private String name;
|
||||
private String retailPrice;
|
||||
private String memberPrice;
|
||||
private Integer num;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd" >
|
||||
|
||||
<web-app>
|
||||
<display-name>Archetype Created Web Application</display-name>
|
||||
</web-app>
|
@ -1,5 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
<h2>Hello World!</h2>
|
||||
</body>
|
||||
</html>
|
@ -54,8 +54,14 @@
|
||||
<version>1.2.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.axet</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<version>0.0.9</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.fuint</groupId>-->
|
||||
<!-- <artifactId>fuint-application</artifactId>-->
|
||||
<!-- <version>1.0.0</version>-->
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.fuint.api.cashier.coltroller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
import com.fuint.api.cashier.service.OilNumGunConfigService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 油号油枪对应信息 controller层
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/cashier")
|
||||
public class OilNumGunConfigController extends BaseController {
|
||||
@Autowired
|
||||
private OilNumGunConfigService configService;
|
||||
|
||||
/**
|
||||
* 查询所有油号油枪对应信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject list(){
|
||||
List<OilNumGunConfig> list = configService.selectList();
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据油号查询油号油枪对应信息
|
||||
* @param oilNum
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{oilNum}")
|
||||
public ResponseObject getOilGun(@PathVariable String oilNum){
|
||||
List<OilNumGunConfig> list = configService.selectListByOilNum(oilNum);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.fuint.api.cashier.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 油号油枪配置表(OilNumGunConfig)实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName("oil_num_gun_config")
|
||||
@ApiModel(value = "OilNumGunConfig对象", description = "油号油枪配置表")
|
||||
public class OilNumGunConfig extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 油号
|
||||
*/
|
||||
private String oilNum;
|
||||
/**
|
||||
* 油枪号
|
||||
*/
|
||||
private String oilGunNum;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
package com.fuint.api.cashier.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
|
||||
public interface OilNumGunConfigMapper extends BaseMapper<OilNumGunConfig> {
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.fuint.api.cashier.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 油号油枪对应信息 业务层
|
||||
*/
|
||||
public interface OilNumGunConfigService extends IService<OilNumGunConfig> {
|
||||
/**
|
||||
* 查询所有油号油枪配置信息
|
||||
* @return
|
||||
*/
|
||||
public List<OilNumGunConfig> selectList();
|
||||
|
||||
/**
|
||||
* 根据油号查询油枪信息
|
||||
* @param oilNum
|
||||
* @return
|
||||
*/
|
||||
public List<OilNumGunConfig> selectListByOilNum(String oilNum);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.fuint.api.cashier.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
import com.fuint.api.cashier.mapper.OilNumGunConfigMapper;
|
||||
import com.fuint.api.cashier.service.OilNumGunConfigService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 油号油枪对应信息 业务层
|
||||
*/
|
||||
@Service
|
||||
public class OilNumGunConfigServiceImpl extends ServiceImpl<OilNumGunConfigMapper, OilNumGunConfig> implements OilNumGunConfigService {
|
||||
@Override
|
||||
public List<OilNumGunConfig> selectList() {
|
||||
LambdaQueryWrapper<OilNumGunConfig> queryWrapper = new LambdaQueryWrapper<OilNumGunConfig>();
|
||||
queryWrapper.groupBy(OilNumGunConfig::getOilNum);
|
||||
List list = baseMapper.selectMaps(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OilNumGunConfig> selectListByOilNum(String oilNum) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (!oilNum.equals("1")){
|
||||
queryWrapper.eq("oil_num",oilNum);
|
||||
}
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
}
|
@ -32,8 +32,8 @@ public class FyPayController {
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping("/query")
|
||||
public Map<String, String> queryOrder() throws Exception {
|
||||
Map<String, String> map = payService.queryOrder();
|
||||
public Map<String, String> queryOrder(Map<String, String> map1) throws Exception {
|
||||
Map<String, String> map = payService.queryOrder(map1);
|
||||
return map;
|
||||
}
|
||||
}
|
@ -16,40 +16,6 @@ public class Builder {
|
||||
private static SecureRandom random = new SecureRandom();
|
||||
|
||||
|
||||
/**
|
||||
* 统一下单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> buildFuiou21() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
||||
map.put("version", "1");
|
||||
map.put("ins_cd", Const.ins_cd);
|
||||
map.put("mchnt_cd", Const.mchnt_cd);
|
||||
map.put("term_id", "88888888");
|
||||
map.put("random_str", randomNumberGenerator.nextBytes().toHex());
|
||||
map.put("sign", "");
|
||||
map.put("order_type", "WECHAT");
|
||||
map.put("goods_des", "这是一个货物");
|
||||
map.put("goods_detail", "");
|
||||
map.put("addn_inf", "");
|
||||
SimpleDateFormat sdf_no = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
map.put("mchnt_order_no", sdf_no.format(calendar.getTime()) + (int) (random.nextDouble() * 100000));
|
||||
map.put("curr_type", "");
|
||||
map.put("order_amt", "1");
|
||||
map.put("term_ip", Const.term_ip);
|
||||
SimpleDateFormat sdf_ts = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
map.put("txn_begin_ts", sdf_ts.format(calendar.getTime()));
|
||||
map.put("goods_tag", "");
|
||||
map.put("notify_url", Const.notify_url);
|
||||
map.put("reserved_sub_appid", "");
|
||||
map.put("reserved_limit_pay", "");
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 条码支付下单
|
||||
*
|
||||
@ -86,7 +52,7 @@ public class Builder {
|
||||
}
|
||||
|
||||
/**
|
||||
* 条码支付下单
|
||||
* 条码支付下单查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ -105,47 +71,4 @@ public class Builder {
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 公众号/服务窗统一下单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> buildFuiou23() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
||||
map.put("version", "1.0");
|
||||
map.put("ins_cd", Const.ins_cd);
|
||||
map.put("mchnt_cd", "6510F5938854");//0001210F0976403富友商户号服务商模式0001210F0976403
|
||||
map.put("term_id", "88888888");
|
||||
map.put("random_str", randomNumberGenerator.nextBytes().toHex());
|
||||
map.put("sign", "");
|
||||
map.put("goods_des", "这是一个货物");
|
||||
map.put("goods_detail", "");
|
||||
map.put("goods_tag", "");
|
||||
map.put("product_id", "");
|
||||
SimpleDateFormat sdf_no = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
map.put("mchnt_order_no", sdf_no.format(calendar.getTime()) + (int) (random.nextDouble() * 100000));
|
||||
map.put("curr_type", "CNY");
|
||||
map.put("order_amt", "1");
|
||||
map.put("term_ip", Const.term_ip);
|
||||
SimpleDateFormat sdf_ts = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
map.put("txn_begin_ts", sdf_ts.format(calendar.getTime()));
|
||||
map.put("notify_url", Const.notify_url);
|
||||
map.put("limit_pay", "");
|
||||
map.put("trade_type", "JSAPI");//微信小程序
|
||||
// map.put("trade_type","LETPAY");//微信小程序
|
||||
// map.put("trade_type","FWC");//支付宝服务窗
|
||||
map.put("openid", "ooIeqs5VwPJnDUYfLweOKcR5AxpE"); //富友公众号 ooIeqs5VwPJnDUYfLweOKcR5AxpE
|
||||
map.put("sub_openid", "osgI-t3iTLkEdGhhwTwyYy_QiqFM");//服务窗时填buyer_id的值 公众号的osgI-t3iTLkEdGhhwTwyYy_QiqFM
|
||||
map.put("sub_appid", "wx04bdf63c774e12ce");//公众号的 wx04bdf63c774e12ce
|
||||
map.put("reserved_fy_term_id", "");
|
||||
map.put("reserved_expire_minute", "0");
|
||||
// map.put("reserved_user_creid ","");
|
||||
map.put("reserved_user_truename", "");
|
||||
map.put("reserved_user_mobile", "");
|
||||
map.put("addn_inf", "");
|
||||
|
||||
return map;
|
||||
}
|
||||
}
|
@ -15,5 +15,5 @@ public interface FyPayService {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, String> queryOrder() throws Exception;
|
||||
public Map<String, String> queryOrder(Map<String, String> map) throws Exception;
|
||||
}
|
||||
|
@ -18,11 +18,18 @@ import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class FyPayServiceImpl implements FyPayService {
|
||||
/**
|
||||
* 条码支付
|
||||
* @param map1
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> pay(Map<String, String> map1) throws Exception {
|
||||
String authCode = map1.get("authCode");
|
||||
String orderNo = map1.get("orderNo");
|
||||
Map<String, String> map = Builder.buildFuiou22();
|
||||
map.put("auth_code",authCode);
|
||||
map.put("mchnt_order_no",orderNo);
|
||||
Map<String, String> reqs = new HashMap<>();
|
||||
reqs.putAll(map);
|
||||
String sign = Utils.getSign(reqs);
|
||||
@ -48,13 +55,14 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
if (Utils.verifySign(resMap, str)){
|
||||
return resMap;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryOrder() throws Exception {
|
||||
public Map<String, String> queryOrder(Map<String, String> map1) throws Exception {
|
||||
String orderNo = map1.get("orderNo");
|
||||
Map<String, String> map = Builder.buildFuiou30();
|
||||
map.put("mchnt_order_no",orderNo);
|
||||
Map<String, String> reqs = new HashMap<>();
|
||||
reqs.putAll(map);
|
||||
String sign = Utils.getSign(reqs);
|
||||
|
17
fuintCashierWeb/src/api/cashier/oilnumgun.js
Normal file
17
fuintCashierWeb/src/api/cashier/oilnumgun.js
Normal file
@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listOilNumGun() {
|
||||
return request({
|
||||
url: '/api/cashier/list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典类型列表
|
||||
export function getOilNumGun(oilNum) {
|
||||
return request({
|
||||
url: '/api/cashier/' + oilNum,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
19
fuintCashierWeb/src/api/cashier/pay.js
Normal file
19
fuintCashierWeb/src/api/cashier/pay.js
Normal file
@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 扫码支付接口
|
||||
export function fyPay(data) {
|
||||
return request({
|
||||
url: '/api/fyPay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询支付结果
|
||||
export function queryPay(data) {
|
||||
return request({
|
||||
url: '/api/fyPay/query',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
52
fuintCashierWeb/src/api/dict/data.js
Normal file
52
fuintCashierWeb/src/api/dict/data.js
Normal file
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query) {
|
||||
return request({
|
||||
url: '/system/dict/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) {
|
||||
return request({
|
||||
url: '/system/dict/data/type/' + dictType,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典数据
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/system/dict/data',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode) {
|
||||
return request({
|
||||
url: '/system/dict/data/' + dictCode,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
60
fuintCashierWeb/src/api/dict/type.js
Normal file
60
fuintCashierWeb/src/api/dict/type.js
Normal file
@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query) {
|
||||
return request({
|
||||
url: '/system/dict/type/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典类型详细
|
||||
export function getType(dictId) {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增字典类型
|
||||
export function addType(data) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改字典类型
|
||||
export function updateType(data) {
|
||||
return request({
|
||||
url: '/system/dict/type',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除字典类型
|
||||
export function delType(dictId) {
|
||||
return request({
|
||||
url: '/system/dict/type/' + dictId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 刷新字典缓存
|
||||
export function refreshCache() {
|
||||
return request({
|
||||
url: '/system/dict/type/refreshCache',
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取字典选择框列表
|
||||
export function optionselect() {
|
||||
return request({
|
||||
url: '/system/dict/type/optionselect',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
@ -33,9 +33,10 @@
|
||||
</div>
|
||||
<div class="bottom-posi">
|
||||
<div class="center-left-wrap">
|
||||
<div class="wrap-box" v-for="(item,index) in 6" :key="index">
|
||||
|
||||
<span>支付方式</span>
|
||||
<div class="wrap-box" v-for="item in payList"
|
||||
:key="item.dictValue"
|
||||
:value="item.dictValue">
|
||||
<span @click="payMethod(item.dictValue)">{{ item.dictLabel }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-left-bottom">
|
||||
@ -52,15 +53,16 @@
|
||||
<div class="center-top">
|
||||
<div class="center-top-tab">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="全部" name="first"></el-tab-pane>
|
||||
<el-tab-pane label="92#" name="second"></el-tab-pane>
|
||||
<el-tab-pane label="95#" name="third"></el-tab-pane>
|
||||
<el-tab-pane label="98#" name="fourth"></el-tab-pane>
|
||||
<el-tab-pane label="0#" name="one"></el-tab-pane>
|
||||
<el-tab-pane label="京0#" name="two"></el-tab-pane>
|
||||
<el-tab-pane label="京10#" name="three"></el-tab-pane>
|
||||
<el-tab-pane label="CNG" name="frou"></el-tab-pane>
|
||||
<el-tab-pane label="LNG" name="frous"></el-tab-pane>
|
||||
<el-tab-pane label="全部" name="1"></el-tab-pane>
|
||||
<el-tab-pane v-for="item in oilNumList" :key="item.id"
|
||||
:label="item.oil_num" :name="item.oil_num"></el-tab-pane>
|
||||
<!-- <el-tab-pane label="95#" name="third"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="98#" name="fourth"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="0#" name="one"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="京0#" name="two"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="京10#" name="three"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="CNG" name="frou"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="LNG" name="frous"></el-tab-pane>-->
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
||||
@ -154,12 +156,37 @@
|
||||
:visible.sync="dialogVisiblej"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<div >
|
||||
立即结算
|
||||
<div style="text-align: center;font-size: 15px;font-weight: bold">付款金额</div>
|
||||
<div style="text-align: center;font-size: 30px;font-weight: bold;color: red;margin: 10px 0">
|
||||
¥300.00
|
||||
<el-tag
|
||||
effect="dark">
|
||||
汽油
|
||||
</el-tag>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div style="text-align: center;margin-bottom: 10px">赠送金额</div>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
<svg t="1697791915471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1479" width="32" height="32"><path d="M149.333333 170.858667A21.546667 21.546667 0 0 1 170.858667 149.333333H384V106.666667H170.858667A64.213333 64.213333 0 0 0 106.666667 170.858667V384h42.666666V170.858667zM170.858667 874.666667A21.546667 21.546667 0 0 1 149.333333 853.141333V640H106.666667v213.141333A64.213333 64.213333 0 0 0 170.858667 917.333333H384v-42.666666H170.858667zM853.12 149.333333A21.546667 21.546667 0 0 1 874.666667 170.858667V384h42.666666V170.858667A64.213333 64.213333 0 0 0 853.141333 106.666667H640v42.666666h213.141333zM874.666667 853.141333A21.546667 21.546667 0 0 1 853.141333 874.666667H640v42.666666h213.141333A64.213333 64.213333 0 0 0 917.333333 853.141333V640h-42.666666v213.141333zM106.666667 490.666667h810.666666v42.666666H106.666667v-42.666666z" fill="#3D3D3D" p-id="1480"></path></svg>
|
||||
</i>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="demo-image">
|
||||
<div class="block" style="text-align: center">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
fit="cover"
|
||||
src="https://oil.wudb.cn/static/img/scan-demo.fcb8b1ab.png"></el-image>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
<el-button @click="dialogVisiblej = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisiblej = false">确 定</el-button>
|
||||
<el-button type="primary" @click="collection">确 定 收 款</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 会员登录-->
|
||||
@ -185,57 +212,97 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "homeindex",
|
||||
data(){
|
||||
return{
|
||||
dialogVisible: false,
|
||||
dialogVisiblej: false,
|
||||
dialogVisiblevip:false,
|
||||
activeName: 'second',
|
||||
tabarr:[
|
||||
{name:'收银台',icon:'el-icon-s-platform'},
|
||||
{name:'充值',icon: 'el-icon-s-finance'},
|
||||
{name:'订单',icon: 'el-icon-s-order'},
|
||||
{name:'会员',icon: 'el-icon-s-custom'},
|
||||
{name:'核销',icon: 'el-icon-s-check'},
|
||||
{name:'挂账',icon:'el-icon-s-claim'},
|
||||
{name:'积分',icon:'el-icon-s-data'},
|
||||
{name:'交班',icon: 'el-icon-s-flag'},
|
||||
],
|
||||
leftindex:0,
|
||||
oilList:[
|
||||
],
|
||||
colorList:[
|
||||
{color:'#e5f0ff'},
|
||||
{color:'#fff2e5'},
|
||||
{color:'#e5edf1'},
|
||||
{color:'#ecfae5'},
|
||||
{color:'#fafafa'}
|
||||
],
|
||||
num: 1,
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
},
|
||||
gocomponents(index){
|
||||
this.leftindex = index
|
||||
},
|
||||
}
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getOilNumGun, listOilNumGun} from "@/api/cashier/oilnumgun";
|
||||
import {fyPay} from "@/api/cashier/pay";
|
||||
|
||||
export default {
|
||||
name: "homeindex",
|
||||
data(){
|
||||
return{
|
||||
authCode:'',
|
||||
// 油号列表
|
||||
oilNumList:[],
|
||||
// 油枪列表
|
||||
oilGunList:[],
|
||||
// 支付方式列表
|
||||
payList:[],
|
||||
dialogVisible: false,
|
||||
dialogVisiblej: false,
|
||||
dialogVisiblevip:false,
|
||||
activeName: 'second',
|
||||
tabarr:[
|
||||
{name:'收银台',icon:'el-icon-s-platform'},
|
||||
{name:'充值',icon: 'el-icon-s-finance'},
|
||||
{name:'订单',icon: 'el-icon-s-order'},
|
||||
{name:'会员',icon: 'el-icon-s-custom'},
|
||||
{name:'核销',icon: 'el-icon-s-check'},
|
||||
{name:'挂账',icon:'el-icon-s-claim'},
|
||||
{name:'积分',icon:'el-icon-s-data'},
|
||||
{name:'交班',icon: 'el-icon-s-flag'},
|
||||
],
|
||||
leftindex:0,
|
||||
oilList:[
|
||||
],
|
||||
colorList:[
|
||||
{color:'#e5f0ff'},
|
||||
{color:'#fff2e5'},
|
||||
{color:'#e5edf1'},
|
||||
{color:'#ecfae5'},
|
||||
{color:'#fafafa'}
|
||||
],
|
||||
num: 1,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getPayList();
|
||||
},
|
||||
methods:{
|
||||
// 确定收款
|
||||
collection(){
|
||||
let map = {
|
||||
authCode : this.authCode,
|
||||
orderNo : new Date().toString()
|
||||
}
|
||||
fyPay(map).then( response => {
|
||||
console.log(response)
|
||||
})
|
||||
},
|
||||
payMethod(payType){
|
||||
console.log(payType)
|
||||
},
|
||||
// 获取支付方式
|
||||
getPayList(){
|
||||
getDicts("payment_type").then( response => {
|
||||
this.payList = response.data;
|
||||
})
|
||||
// 获取油号列表信息
|
||||
listOilNumGun().then( response => {
|
||||
this.oilNumList = response.data
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
handleChange(value) {
|
||||
// console.log(value);
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab.label)
|
||||
getOilNumGun(tab.label).then( response => {
|
||||
console.log(response)
|
||||
})
|
||||
},
|
||||
gocomponents(index){
|
||||
this.leftindex = index
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
Loading…
Reference in New Issue
Block a user