|
|
@@ -1,20 +1,21 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="公司名" prop="companyId">
|
|
|
- <el-select filterable v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">
|
|
|
- <el-option
|
|
|
- v-for="item in companys"
|
|
|
- :key="item.companyId"
|
|
|
- :label="item.companyName"
|
|
|
- :value="item.companyId"/>
|
|
|
- </el-select>
|
|
|
+ <el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="68px">
|
|
|
+ <el-form-item label="公司名" prop="companyId">
|
|
|
+ <el-select v-model="queryParams.companyId" clearable filterable placeholder="请选择公司名" size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in companys"
|
|
|
+ :key="item.companyId"
|
|
|
+ :label="item.companyName"
|
|
|
+ :value="item.companyId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="付款单号" prop="payCode">
|
|
|
<el-input
|
|
|
v-model="queryParams.payCode"
|
|
|
- placeholder="请输入付款单号"
|
|
|
clearable
|
|
|
+ placeholder="请输入付款单号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
@@ -23,8 +24,8 @@
|
|
|
<el-form-item label="订单号" prop="orderCode">
|
|
|
<el-input
|
|
|
v-model="queryParams.orderCode"
|
|
|
- placeholder="请输入订单号"
|
|
|
clearable
|
|
|
+ placeholder="请输入订单号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
@@ -33,8 +34,8 @@
|
|
|
<el-form-item label="外部订单" prop="tradeNo">
|
|
|
<el-input
|
|
|
v-model="queryParams.tradeNo"
|
|
|
- placeholder="请输入外部订单号"
|
|
|
clearable
|
|
|
+ placeholder="请输入外部订单号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
@@ -44,8 +45,8 @@
|
|
|
<el-form-item label="交易单号" prop="bankTransactionId">
|
|
|
<el-input
|
|
|
v-model="queryParams.bankTransactionId"
|
|
|
- placeholder="请输入交易单号"
|
|
|
clearable
|
|
|
+ placeholder="请输入交易单号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
@@ -54,18 +55,18 @@
|
|
|
<el-form-item label="银行单号" prop="bankSerialNo">
|
|
|
<el-input
|
|
|
v-model="queryParams.bankSerialNo"
|
|
|
- placeholder="请输入银行单号"
|
|
|
clearable
|
|
|
+ placeholder="请输入银行单号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="手机号" prop="mobile">
|
|
|
+ <el-form-item label="手机号" prop="mobile">
|
|
|
<el-input
|
|
|
v-model="queryParams.mobile"
|
|
|
- placeholder="请输入会员手机号"
|
|
|
clearable
|
|
|
+ placeholder="请输入会员手机号"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
@@ -74,8 +75,8 @@
|
|
|
<el-form-item label="员工姓名" prop="companyUserNickName">
|
|
|
<el-input
|
|
|
v-model="queryParams.companyUserNickName"
|
|
|
- placeholder="请输入员工姓名"
|
|
|
clearable
|
|
|
+ placeholder="请输入员工姓名"
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
@@ -83,52 +84,55 @@
|
|
|
|
|
|
<el-form-item label="提交时间" prop="createTimeRange">
|
|
|
<el-date-picker
|
|
|
- style="width: 215.4px"
|
|
|
- clearable size="small"
|
|
|
v-model="createTimeRange"
|
|
|
+ clearable end-placeholder="结束日期"
|
|
|
+ size="small"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width: 215.4px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="支付时间" prop="payTime">
|
|
|
<el-date-picker
|
|
|
- style="width:215.4px"
|
|
|
- clearable size="small"
|
|
|
v-model="dateRange"
|
|
|
+ clearable end-placeholder="结束日期"
|
|
|
+ size="small"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width:215.4px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="退款时间" prop="refundTime">
|
|
|
+ <el-form-item label="退款时间" prop="refundTime">
|
|
|
<el-date-picker
|
|
|
- style="width: 215.4px"
|
|
|
- clearable size="small"
|
|
|
v-model="refundDateRange"
|
|
|
+ clearable end-placeholder="结束日期"
|
|
|
+ size="small"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ style="width: 215.4px"
|
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
- <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small" >
|
|
|
- <el-option
|
|
|
- v-for="item in statusOptions"
|
|
|
- :key="item.dictValue"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="item.dictValue"
|
|
|
- />
|
|
|
+ <el-select v-model="queryParams.status" clearable placeholder="请选择状态" size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="item in statusOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-search" size="mini" type="cyan" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -136,91 +140,120 @@
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="warning"
|
|
|
+ v-hasPermi="['store:storePayment:export']"
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
+ type="warning"
|
|
|
@click="handleExport"
|
|
|
- v-hasPermi="['store:storePayment:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
- type="warning"
|
|
|
+ v-hasPermi="['store:storePayment:payNotify']"
|
|
|
size="mini"
|
|
|
+ type="warning"
|
|
|
@click="handlePayNotify"
|
|
|
- v-hasPermi="['store:storePayment:payNotify']"
|
|
|
- >同步订单状态</el-button>
|
|
|
+ >同步订单状态
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+
|
|
|
+<!-- <el-col :span="1.5">-->
|
|
|
+<!-- <el-button-->
|
|
|
+<!-- icon="el-icon-s-order"-->
|
|
|
+<!-- size="mini"-->
|
|
|
+<!-- type="warning"-->
|
|
|
+<!-- @click="openDeliveryNote"-->
|
|
|
+<!-- >批量导入物流单号-->
|
|
|
+<!-- </el-button>-->
|
|
|
+<!-- </el-col>-->
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-s-order"
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ @click="wxOneClickShipping"
|
|
|
+ >微信一键线下自提发货
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
- <el-tabs type="card" v-model="queryParams.businessType" @tab-click="handleClick">
|
|
|
+ <el-tabs v-model="queryParams.businessType" type="card" @tab-click="handleClick">
|
|
|
<el-tab-pane label="收款记录" name="1"></el-tab-pane>
|
|
|
<el-tab-pane label="订单支付记录" name="2"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- <el-table height="500" border v-loading="loading" :data="storePaymentList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="ID" align="center" prop="paymentId" />
|
|
|
- <el-table-column label="付款单号" align="center" prop="payCode" width="120px" />
|
|
|
- <el-table-column label="订单号" align="center" prop="orderCode" width="120px" />
|
|
|
- <el-table-column label="外部订单号" align="center" prop="tradeNo" width="120px" />
|
|
|
- <el-table-column label="会员手机号" align="center" prop="userPhone" width="120px" />
|
|
|
- <el-table-column label="支付类型" align="center" prop="payTypeCode" />
|
|
|
- <el-table-column label="服务商" align="center" prop="payMode" >
|
|
|
+ <el-table v-loading="loading" :data="storePaymentList" border height="500"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" type="selection" width="55"/>
|
|
|
+ <el-table-column align="center" label="ID" prop="paymentId"/>
|
|
|
+ <el-table-column align="center" label="付款单号" prop="payCode" width="120px"/>
|
|
|
+ <el-table-column align="center" label="订单号" prop="orderCode" width="120px"/>
|
|
|
+ <el-table-column align="center" label="外部订单号" prop="tradeNo" width="120px"/>
|
|
|
+ <el-table-column align="center" label="会员手机号" prop="userPhone" width="120px"/>
|
|
|
+ <el-table-column align="center" label="支付类型" prop="payTypeCode"/>
|
|
|
+ <el-table-column align="center" label="服务商" prop="payMode">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in payModeOptions" v-if="scope.row.payMode==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
+ <el-tag v-for="(item, index) in payModeOptions" v-if="scope.row.payMode==item.dictValue" prop="status">
|
|
|
+ {{ item.dictLabel }}
|
|
|
+ </el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="支付金额" align="center" prop="payMoney" />
|
|
|
- <el-table-column label="退款金额" align="center" prop="refundMoney" />
|
|
|
- <el-table-column label="交易单号" align="center" prop="bankTransactionId" />
|
|
|
- <el-table-column label="银行单号" align="center" prop="bankSerialNo" />
|
|
|
- <el-table-column label="所属公司" align="center" prop="companyName" />
|
|
|
- <el-table-column label="所属部门" align="center" prop="deptName" />
|
|
|
- <el-table-column label="员工" align="center" prop="companyUserNickName" />
|
|
|
- <el-table-column label="状态" align="center" prop="status" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag prop="status" v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
- </template>
|
|
|
+ <el-table-column align="center" label="支付金额" prop="payMoney"/>
|
|
|
+ <el-table-column align="center" label="退款金额" prop="refundMoney"/>
|
|
|
+ <el-table-column align="center" label="交易单号" prop="bankTransactionId"/>
|
|
|
+ <el-table-column align="center" label="银行单号" prop="bankSerialNo"/>
|
|
|
+ <el-table-column align="center" label="所属公司" prop="companyName"/>
|
|
|
+ <el-table-column align="center" label="所属部门" prop="deptName"/>
|
|
|
+ <el-table-column align="center" label="员工" prop="companyUserNickName"/>
|
|
|
+ <el-table-column align="center" label="状态" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-for="(item, index) in statusOptions" v-if="scope.row.status==item.dictValue" prop="status">
|
|
|
+ {{ item.dictLabel }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="提交时间" align="center" prop="createTime" width="180">
|
|
|
+ <el-table-column align="center" label="提交时间" prop="createTime" width="180">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
|
|
+ <el-table-column align="center" label="支付时间" prop="payTime" width="180">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="退款时间" align="center" prop="refundTime" width="180">
|
|
|
+ <el-table-column align="center" label="退款时间" prop="refundTime" width="180">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="备注" align="center" prop="remark" />
|
|
|
- <el-table-column label="操作" fixed="right" align="center" width="120px" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column align="center" label="备注" prop="remark"/>
|
|
|
+ <el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作" width="120px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
+ v-hasPermi="['store:storePayment:edit']"
|
|
|
+ icon="el-icon-edit"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['store:storePayment:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
v-if="scope.row.status==1&&scope.row.businessType==1"
|
|
|
+ v-hasPermi="['store:storePayment:refund']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
@click="handleRefund(scope.row)"
|
|
|
- v-hasPermi="['store:storePayment:refund']"
|
|
|
- >退款</el-button>
|
|
|
+ >退款
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
|
- :total="total"
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :total="total"
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
|
|
|
- <el-dialog :title="payNotify.title" :visible.sync="payNotify.open" width="600px" append-to-body>
|
|
|
+ <el-dialog :title="payNotify.title" :visible.sync="payNotify.open" append-to-body width="600px">
|
|
|
<el-form ref="payNotifyForm" :model="payNotifyForm" :rules="payNotifyRules" label-width="100px">
|
|
|
- <el-form-item label="外部单号" prop="tradeNo" >
|
|
|
- <el-input v-model="payNotifyForm.tradeNo" placeholder="请输入物流单号" />
|
|
|
+ <el-form-item label="外部单号" prop="tradeNo">
|
|
|
+ <el-input v-model="payNotifyForm.tradeNo" placeholder="请输入物流单号"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -231,19 +264,19 @@
|
|
|
|
|
|
|
|
|
<!-- 添加或修改支付明细对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
+ <el-dialog :title="title" :visible.sync="open" append-to-body width="500px">
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
<el-form-item label="支付订单号" prop="payCode">
|
|
|
- <el-input v-model="form.payCode" disabled placeholder="请输入支付订单号" />
|
|
|
+ <el-input v-model="form.payCode" disabled placeholder="请输入支付订单号"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="支付类型" prop="payTypeCode">
|
|
|
- <el-input v-model="form.payTypeCode" disabled placeholder="请输入支付类型" />
|
|
|
+ <el-input v-model="form.payTypeCode" disabled placeholder="请输入支付类型"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="支付金额" prop="payMoney">
|
|
|
- <el-input v-model="form.payMoney" disabled placeholder="请输入支付金额" />
|
|
|
+ <el-input v-model="form.payMoney" disabled placeholder="请输入支付金额"/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="备注" prop="remark">
|
|
|
- <el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
+ <el-input v-model="form.remark" placeholder="请输入备注"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -251,19 +284,19 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog :title="refund.title" :visible.sync="refund.open" width="500px" append-to-body>
|
|
|
+ <el-dialog :title="refund.title" :visible.sync="refund.open" append-to-body width="500px">
|
|
|
<el-form ref="refundForm" :model="refundForm" :rules="refundRules" label-width="100px">
|
|
|
<el-form-item label="支付订单号" prop="payCode">
|
|
|
- <el-input v-model="refundForm.payCode" disabled placeholder="请输入支付订单号" />
|
|
|
+ <el-input v-model="refundForm.payCode" disabled placeholder="请输入支付订单号"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="支付类型" prop="payTypeCode">
|
|
|
- <el-input v-model="refundForm.payTypeCode" disabled placeholder="请输入支付类型" />
|
|
|
+ <el-input v-model="refundForm.payTypeCode" disabled placeholder="请输入支付类型"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="支付金额" prop="payMoney">
|
|
|
- <el-input v-model="refundForm.payMoney" disabled placeholder="请输入支付金额" />
|
|
|
+ <el-input v-model="refundForm.payMoney" disabled placeholder="请输入支付金额"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="退款金额" prop="refundMoney">
|
|
|
- <el-input-number :min="0" v-model="refundForm.refundMoney" placeholder="请输入退款金额" />
|
|
|
+ <el-input-number v-model="refundForm.refundMoney" :min="0" placeholder="请输入退款金额"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -271,54 +304,163 @@
|
|
|
<el-button @click="cancelRefund">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 批量发货 -->
|
|
|
+ <el-dialog
|
|
|
+ :before-close="handleClose"
|
|
|
+ :visible.sync="deliveryNoteOpen"
|
|
|
+ center
|
|
|
+ title="批量发货"
|
|
|
+ width="35%"
|
|
|
+ >
|
|
|
+ <span slot="footer">
|
|
|
+ <el-form ref="ruleForm" :model="ruleForm" :rules="rules" class="demo-ruleForm" label-width="100px">
|
|
|
+ <el-form-item label="小程序:" prop="miniAppId">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.miniAppId"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择发货小程序"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in miniAppList"
|
|
|
+ :key="item.appId"
|
|
|
+ :label="item.appName"
|
|
|
+ :value="item.appId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="发货类型" prop="shipmentType">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.shipmentType"
|
|
|
+ clearable
|
|
|
+ disabled
|
|
|
+ placeholder="选择发货类型"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in shipmentTypeList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.lable"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-upload
|
|
|
+ ref="upload"
|
|
|
+ :action="orderUpload.url"
|
|
|
+ :auto-upload="false"
|
|
|
+ :data="{
|
|
|
+ miniAppId: ruleForm.miniAppId,
|
|
|
+ shipmentType: ruleForm.shipmentType
|
|
|
+ }"
|
|
|
+ :disabled="orderUpload.isUploading"
|
|
|
+ :headers="orderUpload.headers"
|
|
|
+ :limit="1"
|
|
|
+ :on-progress="handleFileUploadProgress"
|
|
|
+ :on-success="handleFileSuccess"
|
|
|
+ accept=".xlsx, .xls"
|
|
|
+ drag
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ 将文件拖到此处,或
|
|
|
+ <em>点击上传</em>
|
|
|
+ </div>
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
+ <el-link
|
|
|
+ id="templateDownloadLink"
|
|
|
+ type="info"
|
|
|
+ @click.prevent="importDeliveryNoteTemplate"
|
|
|
+ >
|
|
|
+ 下载模板
|
|
|
+ </el-link>
|
|
|
+ </div>
|
|
|
+ <div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
|
|
+ </el-upload>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-button @click="deliveryNoteOpen = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitDeliveryNote">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { refundStorePayment,listStorePayment, getStorePayment, delStorePayment, addStorePayment, updateStorePayment, exportStorePayment,setPayNotify } from "@/api/hisStore/storePayment";
|
|
|
-import { getCompanyList } from "@/api/company/company";
|
|
|
+import {
|
|
|
+ refundStorePayment,
|
|
|
+ listStorePayment,
|
|
|
+ getStorePayment,
|
|
|
+ delStorePayment,
|
|
|
+ addStorePayment,
|
|
|
+ updateStorePayment,
|
|
|
+ exportStorePayment,
|
|
|
+ setPayNotify,
|
|
|
+ importDeliveryNoteExpressTemplate,
|
|
|
+ oneClickShipping
|
|
|
+} from '@/api/hisStore/storePayment'
|
|
|
+import { getCompanyList } from '@/api/company/company'
|
|
|
+import { getConfigByKey } from '@/api/system/config'
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
+
|
|
|
export default {
|
|
|
- name: "HisStorePayment",
|
|
|
+ name: 'HisStorePayment',
|
|
|
data() {
|
|
|
return {
|
|
|
- payModeOptions:[
|
|
|
- { dictLabel: "微信支付", dictValue: "wx" },
|
|
|
- { dictLabel: "汇付", dictValue: "hf" }
|
|
|
+ payModeOptions: [
|
|
|
+ { dictLabel: '微信支付', dictValue: 'wx' },
|
|
|
+ { dictLabel: '汇付', dictValue: 'hf' }
|
|
|
],
|
|
|
- refund:{
|
|
|
- title:"退款",
|
|
|
- open:false,
|
|
|
+ refund: {
|
|
|
+ title: '退款',
|
|
|
+ open: false
|
|
|
},
|
|
|
- refundForm:{
|
|
|
- refundMoney:0
|
|
|
+ refundForm: {
|
|
|
+ refundMoney: 0
|
|
|
},
|
|
|
- refundRules:{
|
|
|
-
|
|
|
+ refundRules: {},
|
|
|
+ miniAppList: [],
|
|
|
+ payNotify: {
|
|
|
+ title: '同步订单状态',
|
|
|
+ open: false
|
|
|
},
|
|
|
- payNotify:{
|
|
|
- title:"同步订单状态",
|
|
|
- open:false,
|
|
|
+ orderUpload: {
|
|
|
+ // 是否显示弹出层(用户导入)
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题(用户导入)
|
|
|
+ title: '',
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 是否更新已经存在的用户数据
|
|
|
+ updateSupport: 0,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: { Authorization: 'Bearer ' + getToken() },
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + '/store/store/storePayment/importDeliveryNoteExpress'
|
|
|
},
|
|
|
- payNotifyForm:{
|
|
|
- tradeNo:null,
|
|
|
+ payNotifyForm: {
|
|
|
+ tradeNo: null
|
|
|
},
|
|
|
- payNotifyRules:{
|
|
|
+ payNotifyRules: {
|
|
|
tradeNo: [
|
|
|
- { required: true, message: "外部单号不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
+ { required: true, message: '外部单号不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
},
|
|
|
- companys:[],
|
|
|
- statusOptions:[],
|
|
|
- createTimeRange:[],
|
|
|
- showLoading:false,
|
|
|
+ companys: [],
|
|
|
+ statusOptions: [],
|
|
|
+ createTimeRange: [],
|
|
|
+ showLoading: false,
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
|
- dateRange:[],
|
|
|
- refundDateRange:[],
|
|
|
+ dateRange: [],
|
|
|
+ refundDateRange: [],
|
|
|
// 非多个禁用
|
|
|
multiple: true,
|
|
|
// 显示搜索条件
|
|
|
@@ -327,13 +469,24 @@ export default {
|
|
|
total: 0,
|
|
|
// 支付明细表格数据
|
|
|
storePaymentList: [],
|
|
|
+ shipmentTypeList: [{
|
|
|
+ lable: '线上发货',
|
|
|
+ value: '1'
|
|
|
+ }, {
|
|
|
+ lable: '线下自提',
|
|
|
+ value: '2'
|
|
|
+ }],
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
+ title: '',
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ ruleForm: {
|
|
|
+ miniAppId: null,
|
|
|
+ shipmentType: '2'
|
|
|
+ },
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
- businessType:"1",
|
|
|
+ businessType: '1',
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
payCode: null,
|
|
|
@@ -348,101 +501,112 @@ export default {
|
|
|
companyId: null,
|
|
|
companyUserId: null,
|
|
|
deptId: null,
|
|
|
- bankTransactionId:null,
|
|
|
- companyUserNickName:null,
|
|
|
+ bankTransactionId: null,
|
|
|
+ companyUserNickName: null
|
|
|
},
|
|
|
+ deliveryNoteOpen: false,
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
- rules: {
|
|
|
- }
|
|
|
- };
|
|
|
+ rules: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ uploadUrl() {
|
|
|
+ return process.env.VUE_APP_BASE_API +
|
|
|
+ '/store/store/storePayment/importDeliveryNoteExpress?miniAppId=' +
|
|
|
+ this.ruleForm.miniAppId + '&shipmentType' + this.ruleForm.shipmentType
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.getDicts("store_payment_status").then((response) => {
|
|
|
- this.statusOptions = response.data;
|
|
|
- });
|
|
|
+ this.getDicts('store_payment_status').then((response) => {
|
|
|
+ this.statusOptions = response.data
|
|
|
+ })
|
|
|
|
|
|
getCompanyList().then(response => {
|
|
|
- this.companys = response.data;
|
|
|
- });
|
|
|
- this.getList();
|
|
|
+ this.companys = response.data
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
- submitPayNotifyForm(){
|
|
|
- this.$refs["payNotifyForm"].validate(valid => {
|
|
|
+ submitPayNotifyForm() {
|
|
|
+ this.$refs['payNotifyForm'].validate(valid => {
|
|
|
if (valid) {
|
|
|
setPayNotify(this.payNotifyForm).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
- this.msgSuccess("操作成功");
|
|
|
- this.payNotify.open = false;
|
|
|
- this.getList();
|
|
|
+ this.msgSuccess('操作成功')
|
|
|
+ this.payNotify.open = false
|
|
|
+ this.getList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
- handlePayNotify(){
|
|
|
- this.payNotify.open = true;
|
|
|
- this.payNotifyForm.tradeNo = null;
|
|
|
+ handlePayNotify() {
|
|
|
+ this.payNotify.open = true
|
|
|
+ this.payNotifyForm.tradeNo = null
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
|
- this.queryParams.businessType=tab.name
|
|
|
- this.getList();
|
|
|
+ this.queryParams.businessType = tab.name
|
|
|
+ this.getList()
|
|
|
},
|
|
|
- handleRefund(row){
|
|
|
- this.refundForm.paymentId=row.paymentId;
|
|
|
- this.refundForm.payCode=row.payCode;
|
|
|
- this.refundForm.payTypeCode=row.payTypeCode;
|
|
|
- this.refundForm.payMoney=row.payMoney;
|
|
|
- this.refundForm.refundMoney=row.payMoney;
|
|
|
- this.refund.open=true;
|
|
|
+ handleRefund(row) {
|
|
|
+ this.refundForm.paymentId = row.paymentId
|
|
|
+ this.refundForm.payCode = row.payCode
|
|
|
+ this.refundForm.payTypeCode = row.payTypeCode
|
|
|
+ this.refundForm.payMoney = row.payMoney
|
|
|
+ this.refundForm.refundMoney = row.payMoney
|
|
|
+ this.refund.open = true
|
|
|
},
|
|
|
- cancelRefund(){
|
|
|
- this.refund.open = false;
|
|
|
+ cancelRefund() {
|
|
|
+ this.refund.open = false
|
|
|
+ },
|
|
|
+ //发货单模板下载
|
|
|
+ importDeliveryNoteTemplate() {
|
|
|
+ importDeliveryNoteExpressTemplate().then((response) => {
|
|
|
+ this.download(response.msg)
|
|
|
+ })
|
|
|
},
|
|
|
submitRefundForm() {
|
|
|
- this.$refs["refundForm"].validate(valid => {
|
|
|
+ this.$refs['refundForm'].validate(valid => {
|
|
|
if (valid) {
|
|
|
- this.showLoading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '处理中...',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
- });
|
|
|
- refundStorePayment(this.refundForm).then(response => {
|
|
|
- this.showLoading.close()
|
|
|
- if (response.code === 200) {
|
|
|
- this.msgSuccess("操作成功");
|
|
|
- this.refund.open = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- else{
|
|
|
- this.msgError(response.msg);
|
|
|
- }
|
|
|
- });
|
|
|
+ this.showLoading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '处理中...',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ refundStorePayment(this.refundForm).then(response => {
|
|
|
+ this.showLoading.close()
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess('操作成功')
|
|
|
+ this.refund.open = false
|
|
|
+ this.getList()
|
|
|
+ } else {
|
|
|
+ this.msgError(response.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
/** 查询支付明细列表 */
|
|
|
getList() {
|
|
|
- this.loading = true;
|
|
|
- if(this.createTimeRange!=null&&this.createTimeRange.length==2){
|
|
|
- this.queryParams.createTimeRange=this.createTimeRange[0]+"--"+this.createTimeRange[1]
|
|
|
- }
|
|
|
- else{
|
|
|
- this.queryParams.createTimeRange=null;
|
|
|
+ this.loading = true
|
|
|
+ if (this.createTimeRange != null && this.createTimeRange.length == 2) {
|
|
|
+ this.queryParams.createTimeRange = this.createTimeRange[0] + '--' + this.createTimeRange[1]
|
|
|
+ } else {
|
|
|
+ this.queryParams.createTimeRange = null
|
|
|
}
|
|
|
- listStorePayment(this.addDateRange(this.queryParams, this.dateRange),this.refundDateRange).then(response => {
|
|
|
- this.storePaymentList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ listStorePayment(this.addDateRange(this.queryParams, this.dateRange), this.refundDateRange).then(response => {
|
|
|
+ this.storePaymentList = response.rows
|
|
|
+ this.total = response.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
+ this.open = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
@@ -463,92 +627,152 @@ export default {
|
|
|
companyId: null,
|
|
|
companyUserId: null,
|
|
|
deptId: null
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
+ }
|
|
|
+ this.resetForm('form')
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.paymentId)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.reset();
|
|
|
- this.open = true;
|
|
|
- this.title = "添加支付明细";
|
|
|
+ this.reset()
|
|
|
+ this.open = true
|
|
|
+ this.title = '添加支付明细'
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
+ this.reset()
|
|
|
const paymentId = row.paymentId || this.ids
|
|
|
getStorePayment(paymentId).then(response => {
|
|
|
- this.form = response.data;
|
|
|
- this.open = true;
|
|
|
- this.title = "修改支付明细";
|
|
|
- });
|
|
|
+ this.form = response.data
|
|
|
+ this.open = true
|
|
|
+ this.title = '修改支付明细'
|
|
|
+ })
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.paymentId != null) {
|
|
|
updateStorePayment(this.form).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
+ this.msgSuccess('修改成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
addStorePayment(this.form).then(response => {
|
|
|
if (response.code === 200) {
|
|
|
- this.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
+ this.msgSuccess('新增成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const paymentIds = row.paymentId || this.ids;
|
|
|
- this.$confirm('是否确认删除支付明细编号为"' + paymentIds + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delStorePayment(paymentIds);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(function() {});
|
|
|
+ const paymentIds = row.paymentId || this.ids
|
|
|
+ this.$confirm('是否确认删除支付明细编号为"' + paymentIds + '"的数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ return delStorePayment(paymentIds)
|
|
|
+ }).then(() => {
|
|
|
+ this.getList()
|
|
|
+ this.msgSuccess('删除成功')
|
|
|
+ }).catch(function() {
|
|
|
+ })
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有支付明细数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportStorePayment(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- }).catch(function() {});
|
|
|
+ const queryParams = this.queryParams
|
|
|
+ this.$confirm('是否确认导出所有支付明细数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ return exportStorePayment(queryParams)
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg)
|
|
|
+ }).catch(function() {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //打开发货单
|
|
|
+ openDeliveryNote() {
|
|
|
+ this.deliveryNoteOpen = true
|
|
|
+ this.getAppList()
|
|
|
+ },
|
|
|
+ getAppList() {
|
|
|
+ this.miniAppList = []
|
|
|
+ const key = 'courseMa.config'
|
|
|
+ getConfigByKey(key).then(response => {
|
|
|
+ const { code, data } = response
|
|
|
+ if (code === 200) {
|
|
|
+ let value = data?.configValue
|
|
|
+ if (value) {
|
|
|
+ console.log('打印-----------------》', value)
|
|
|
+ const appList = JSON.parse(value)
|
|
|
+ this.miniAppList = appList.filter(v => v.type === '1').map(v => {
|
|
|
+ return { appId: v.appid, appName: v.name }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 文件上传中处理
|
|
|
+ handleFileUploadProgress(event, file, fileList) {
|
|
|
+ this.orderUpload.isUploading = true
|
|
|
+ },
|
|
|
+ // 文件上传成功处理
|
|
|
+ handleFileSuccess(response, file, fileList) {
|
|
|
+ this.orderUpload.isUploading = false
|
|
|
+ this.$refs.upload.clearFiles()
|
|
|
+ this.importMsgOpen = true
|
|
|
+ this.importMsg = response.msg
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ // 提交发货单
|
|
|
+ submitDeliveryNote() {
|
|
|
+ const uploadFiles = this.$refs.upload.uploadFiles
|
|
|
+ if (uploadFiles.length === 0) {
|
|
|
+ this.$message.error('请选择要上传的文件')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.upload.submit()
|
|
|
+ },
|
|
|
+ wxOneClickShipping(){
|
|
|
+ this.$confirm('是否同步微信线下发货?', '一键发货', {
|
|
|
+ confirmButtonText: '是',
|
|
|
+ cancelButtonText: '否',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ oneClickShipping().then(response => {
|
|
|
+ if(response.code === 200) {
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|